Archive: Extract contents of folders?


Extract contents of folders?
I have an installer that contains hundreds of files.

So in an attempt to organize the compile-folder, I have made a lot of folders and categorized them, and put the corresponding files into them. So that instead of having hundreds of files floating around in the compiler environment, I have a dousin folders with the files in them.

What I'm wondering about, is what is the most efficient way of extracting the contents of these folders, when I include them in the installer?

I guess I can do a:


SetOutPath $INSTDIR
File /r "A_Folder"
CopyFiles "$INSTDIR\A_Folder\FileA.bmp" "$INSTDIR\FileA.bmp"

[many more folders and files in the same manner here]

RMDir /r "$INSTDIR\A_Folder"


but since we're talking hundreds of files and a dousin folders here, that would be very inefficient; extracting the whole folder first, then copying out the content, and lastly removing the folder again.

So there must be an easier, more efficient way that I can tell the installer that "this folder and it's files are to be included, and the contents of the folder is to be extracted to this path".

I'm sure there's an quick and easy piece of code I can use for this, but what is it?

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

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

Woah...

-As I thought, it would be embarrassingly simple... :o

Well - didn't think it would be this embarrassingly simple, but....


Well - thanks a lot. :) Now my installer won't be all clunky.