Skip to content
⌘ NSIS Forum Archive

Quick directory delete

7 posts

michaelmross#

Quick directory delete

On uninstall, I want to delete a directory that may contain several hundred files. With RMDIR /r, each file is individually deleted - this is very slow and unnerving for the user. Is there a way to delete the whole folder at once without the recursive process of deleting each file individually first?
Comperio#
Have you tried DELETE c:\path\*.* followd by RMDIR /r? (Just a thought--I've not actually tried it...)
bdfy#
I used the following to delete directory $INSTDIR\resistance
Section
....
Execwait '"$INSTDIR\Respack.bat"'
...
SectionEnd
Respack.bat
RMDir /s /q resistance
Note: you will see splash od DOs screen...🙁
kichik
Is there any chance we can easily do it with future versions
of NSIS ?
kichik#
What do you think DOS's RMDIR does differently? Have you tried using SetDetailsPrint to disable output of NSIS's RMDir? That might speed it up a bit.
badcom#
Bumping this

Hi guys,

Any suggestion for this? I'm deleting a dir when launching the browser and it's been quite slow.

Any work-around?
JasonFriday13#
What about deleting the dir in a separate executable when the program closes? Or is this an installer, not a program launcher?