Archive: Directory structure preservation


Directory structure preservation
I'm using "File /r Ancillaries\*.*" to write a complex directory tree & file structure during my install. According to the documentation the directory structure is supposed to be preserved when I do this, but I see all of the files throughout the tree being written to the directory I've specified via SetOutPath. I'm trying to avoid having to call SetOutPath to write to each subdirectory in the tree. Is there a way to actually have the File command preserve the directory structure without calling out each subdirectory b name in a command somewhere?

Thanks for any help you can provide!


File /r Ancillaries\*

All files and subdirectories under Ancillaries.


Same result
Same thing with \* instead of \*.* - all of the files in the subdirectories (Ancillaries and below) end up at the same directory level. None of the subdirectories are created. I'm setting my output location to a directory called "data". What I 'd like to have happen is to end up with

data\Ancillaries
files under Ancillaries
data\Ancillaries\dir1
files under dir1
data\Ancillaries\dir1\someOtherDir
files under someOtherDir

instead I'm getting

data
files under Ancillaries
files under dir1
files under someOtherDir


Weird... worked for me 1000 times and still working.

If you create a directory e.g. My application Setup and add inside there the Ancillaries the instruction has to be:
File /r "C:\My application Setup\*"
So when you run the installer "My application Setup" is replaced by the $INSTDIR and Ancillaries with its complete structure resides it tact under $INSTDIR.


Figured it out!
Thanks for the help - I figured out the problem. What I needed to do was:

SetOutPath "$INSTDIR\Ancillaries"
File /r Ancillaries\*.*

Since I didn't want everything in the directory above Ancillaries, this was the way to do it.


You could just do File /r Ancillaries then. That retains the Ancillaries folder as well.

Stu


But then it'll recursively look for other files or folders named "Ancillaries" under the current working directory.