khartley
19th June 2008 18:57 UTC
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!
Red Wine
19th June 2008 19:14 UTC
File /r Ancillaries\*
All files and subdirectories under Ancillaries.
khartley
19th June 2008 19:31 UTC
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
Red Wine
19th June 2008 19:47 UTC
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.
khartley
19th June 2008 20:38 UTC
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.
Afrow UK
20th June 2008 13:11 UTC
You could just do File /r Ancillaries then. That retains the Ancillaries folder as well.
Stu
kichik
20th June 2008 13:24 UTC
But then it'll recursively look for other files or folders named "Ancillaries" under the current working directory.