SteveRussell
7th September 2006 02:03 UTC
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?
JasonFriday13
7th September 2006 02:54 UTC
Try:
File /r "c:\Source Directory\ase\*.*"
SteveRussell
7th September 2006 03:16 UTC
Thank you so much! I was having trouble understanding the manual in this regard.
SteveRussell
9th September 2006 02:08 UTC
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.
Anders
9th September 2006 03:09 UTC
RMDir /r "$INSTDIR\ase\"
CrushBug
9th September 2006 03:10 UTC
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.
SteveRussell
9th September 2006 05:04 UTC
Thank you very much, gentlemen! The quality of this forum is exceptional, and I greatly appreciate it.