Archive: Some questions from a noob


Some questions from a noob
1. Matching/regular expressions.
I know the asterisk is used, but what other matching characters are used(if at all)?

2. Matching expressions, how do they work.
I need to rename a folder that doesn't exactly have a perfectly consistent name, i.e. name-<version number>-<platform>
and I need to rename it. Will the following example work?

Rename $TEMP\poppyseed*bun $TEMP\bagel


3. Do I need to download a 3rd party plugin to extract files from zip archives, or is there some builtin method?
I'd prefer the builtin method.

4. What is a better way to copy files from one directory to another.
Rename or Copy ? Also if I misunderstood what Rename can do my mistake.


I have a feeling I am forgetting something important here but

  1. NSIS doesn't support regular expression, but you may try these functions:
    http://msdn.microsoft.com/en-us/library/bb759983.aspx
    http://msdn.microsoft.com/en-us/library/ff468910.aspx
  2. Using FindFirst with wildcards, FindNext & FindClose.
  3. Using plugin such as ZipDLL or NsUnzip.
  4. Copyfile can also be used to copy folder: CopyFiles /silent $INSTDIR $TEMP.

Originally posted by pewpewpew
1. Matching/regular expressions.
I know the asterisk is used, but what other matching characters are used(if at all)?
Asterisks and question marks are allowed as wildcards. * can be anything, ? can be only one character long.

So @MSG, does that mean the code I have for #2 will work

Also thanks to @Jiake for answering #4


Originally posted by pewpewpew
So @MSG, does that mean the code I have for #2 will work
Jiake already answered that question. I suggest you follow his advice.