Archive: Basic Question: Multiple Files


Basic Question: Multiple Files
I have what I'm guessing is a pretty basic question but one I've been unable to answer.

I have been working on a program that has multiple files (images, documents, ect.) These files are organized into a file hierarchy. I wanted a basic installer that would take these files and copy them into the directory with the same hierarchy.

Unfortunately whenever I try to use the File command to do this it creates unnecessary copies of the folders and files everywhere. Normally my hierarchy looks like:

main
media
all media files...
content
html
html files...
tutorials
tutorial files...
ect.

Instead when it is installed I get this:


main
all media files...
html
html files...
tutorials
tutorial files...

media
all media files...
content
html
html files...
tutorials
tutorial files...

Although the program will still technically work because the files were transferred correctly, I am still left with all these unnecessary and ugly files. The code I used for transferring is incredibly basic:

File *.*

I have tried using /r /a and /x to try and remove files but I still get this mess.

I tried looking through the help manual and all the tutorials and FAQ but I guess they don't have an answer to my question.

Any thoughts?

Thanks for reading my message.


Try adding the individual folders:

file /a /r main
file /a /r media
file /a /r content
...


Example:

CreateDirectory $INSTDIR\DestFolderWithSubHierarchy
SetOutPath $INSTDIR\DestFolderWithSubHierarchy
File /r SourceFolderWithSubHierarchy\*.*

This will copy all folders with all files into the same hierarchy within the destination.