|
|
#1 |
|
Junior Member
Join Date: Dec 2008
Posts: 4
|
Hello,
I have used search and can not find an answer to my question, can someone help me? I have a sub folder within a folder and want to delete it along with any contents. I can delete files within a folder but not the folder itself Here is my code #Installs/Deletes files in specified directory------------------------------------------------------------------------------------------------------ Section -Main SEC0003 SetOutPath "$DOCUMENTS\Firmware\Phase 1" Delete *.* #SetOverwrite on SectionEnd #-------------------------------------------------------------------------------------- #Installs/Deletes files in specified directory------------------------------------------------------ Section -Main SEC0004 SetOutPath "$DOCUMENTS\Connect \Phase 2" Delete 2.23 SetOverwrite on SectionEnd #-------------- 2.23 is one of the folders I want to delete. |
|
|
|
|
|
#2 |
|
Join Date: Sep 2003
Posts: 27,873
|
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2008
Posts: 4
|
Thanks for the quick reply.
So can you clarify if the following will work? and delete the folder 1.57 and its contents Section -Main SEC0003 SetOutPath "$DOCUMENTS\Firmware\Phase 1\1.57" RMDir /r $INSTDIR #SetOverwrite on SectionEnd Thanks again Wayne |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Don't use SetOutPath on it. You will lock the folder if you do that. Also never use RMDir /r on $INSTDIR in case the user has chosen C:\Windows for it (for example).
RMDir /r "$DOCUMENTS\Firmware\Phase 1\1.57" Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|