Old 17th October 2014, 09:07   #1
humba
Junior Member
 
Join Date: Oct 2014
Posts: 3
Source tree rename to destination tree

Hello,

how to take a tree from source and put it to an other location for destination ?

An example:
code:

File /r Server



takes all files from <sourcedir>\Server and below and installs it to $INSTDIR\Server

What i want to do is to place it to $INSTDIR\*.* (i.e. pruning the "Server" directory.

The only way i found is to list each file of the tree seperately and treat it that way:
code:

File /oname=file1.txt Server\file1.txt
File /oname=file2.txt Server\file2.txt
...



Is there an easier way ?

regards

Last edited by humba; 17th October 2014 at 09:46. Reason: Fixing the option of the File command (/r instead of /s)
humba is offline   Reply With Quote
Old 17th October 2014, 09:38   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
I haven't heard of the /s switch (it's not in the docs), but try this:
Quote:
SetOutPath "$INSTDIR"
File /r "Server\*.*"

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 17th October 2014, 09:41   #3
humba
Junior Member
 
Join Date: Oct 2014
Posts: 3
If i read the doc correctly it does include sub-directories of "server\*". But as written in the original post i was not able to omit the "Server" part when installing.

So i get
code:

$INSTDIR\Server\file1.txt



instead of (this is what i want)
code:

$INSTDIR\file1.txt

humba is offline   Reply With Quote
Old 17th October 2014, 09:53   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Did you try my code? (my own test worked).

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 17th October 2014, 10:05   #5
humba
Junior Member
 
Join Date: Oct 2014
Posts: 3
[Solved] Source tree rename to destination tree

Tested myself. you're right.

It seems that i have mis-read the doc.

Thanks for your help
humba is offline   Reply With Quote
Old 17th October 2014, 10:07   #6
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
No problem .

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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