Old 29th March 2011, 23:33   #1
pewpewpew
Junior Member
 
Join Date: Mar 2011
Posts: 2
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?
code:
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
pewpewpew is offline   Reply With Quote
Old 30th March 2011, 02:18   #2
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 206
  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.

Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.).
Email: 137729898@qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 30th March 2011, 09:07   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by pewpewpew View Post
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.
MSG is offline   Reply With Quote
Old 31st March 2011, 02:01   #4
pewpewpew
Junior Member
 
Join Date: Mar 2011
Posts: 2
So @MSG, does that mean the code I have for #2 will work

Also thanks to @Jiake for answering #4
pewpewpew is offline   Reply With Quote
Old 31st March 2011, 05:47   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by pewpewpew View Post
So @MSG, does that mean the code I have for #2 will work
Jiake already answered that question. I suggest you follow his advice.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
copy, extracting, matching, plugins, rename

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump