pewpewpew
29th March 2011 23:33 UTC
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
jiake
30th March 2011 02:18 UTC
- 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 - Using FindFirst with wildcards, FindNext & FindClose.
- Using plugin such as ZipDLL or NsUnzip.
- Copyfile can also be used to copy folder: CopyFiles /silent $INSTDIR $TEMP.
MSG
30th March 2011 09:07 UTC
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.
pewpewpew
31st March 2011 02:01 UTC
So @MSG, does that mean the code I have for #2 will work
Also thanks to @Jiake for answering #4
MSG
31st March 2011 05:47 UTC
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.