Skip to content
⌘ NSIS Forum Archive

Source tree rename to destination tree

6 posts

humba#edited

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:

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:

File /oname=file1.txt Server\file1.txt
File /oname=file2.txt Server\file2.txt
...
Is there an easier way ?

regards
JasonFriday13#
I haven't heard of the /s switch (it's not in the docs), but try this:
SetOutPath "$INSTDIR"
File /r "Server\*.*"
humba#
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

$INSTDIR\Server\file1.txt
instead of (this is what i want)

$INSTDIR\file1.txt
humba#
[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