Archive: extracting directories


extracting directories
Is it possible to extract entire directories and subdirectories (and their files) with File or some other command, without explicitly naming them?

I have a subdirectory "ase" that contains multiple directories of its own.

Here's what I have, which fails:

SetOutPath "$INSTDIR\ase"
SetOverwrite ifnewer
File "c:\Source Directory\ase\"

If I further specify a directory, it succeeds:

File "c:\Source Directory\ase\a\"

Is this in fact the correct way to extract folders and files to my install directory?


Try:

File /r "c:\Source Directory\ase\*.*"

Thank you so much! I was having trouble understanding the manual in this regard.


And what would be the corresponding comprehensive Delete operation for:

File /r "c:\Source Directory\ase\*.*"

Without success, I tried:

Delete "$INSTDIR\ase\*.*"

None of the subfolders and their content were affected.


RMDir /r "$INSTDIR\ase\"


RMDir /r /REBOOTOK "$INSTDIR\ase"

where /r is do subdirectories, and /REBOOTOK allows for anything that was in-use to be removed on the next reboot.

Be careful as you can't remove the current working directory (i.e. SetOutPath $INSTDIR then try to RMDir $INSTDIR). You have to move out of it.

Check out section 4.9.1.8 in the help for more on RMDir.


Thank you very much, gentlemen! The quality of this forum is exceptional, and I greatly appreciate it.