LordPorker 7 Posted April 27, 2016 Report Share Posted April 27, 2016 Is it possible to delete folders without the windows message prompt displaying? I have dozens of folders that need deleting, and it's getting repetitive! Quote Link to post Share on other sites
deliter 203 Posted April 27, 2016 Report Share Posted April 27, 2016 yes there is a delete folder command in the toolbox,it only prompts error messages like the file in the folder is currently in use,which you cannot delete Quote Link to post Share on other sites
pash 504 Posted April 27, 2016 Report Share Posted April 27, 2016 try use shell command set(#Folder,"{$special folder("Desktop")}\\test\\test","Global") shell("cmd /c RD /Q \"{#Folder}\"") more infohttp://www.sevenforums.com/tutorials/55721-folder-delete-command-prompt.html 2 Quote Link to post Share on other sites
LordPorker 7 Posted April 27, 2016 Author Report Share Posted April 27, 2016 try use shell command set(#Folder,"{$special folder("Desktop")}\\test\\test","Global") shell("cmd /c RD /Q \"{#Folder}\"") more infohttp://www.sevenforums.com/tutorials/55721-folder-delete-command-prompt.html Thanks for that, Pash. This needs to be default in UB, but a handy workaround. Quote Link to post Share on other sites
Bot-Factory 602 Posted April 27, 2016 Report Share Posted April 27, 2016 run python("import shutil shutil.rmtree(\'d:\\xxx\')") 2 Quote Link to post Share on other sites
Denethor 1 Posted April 14, 2017 Report Share Posted April 14, 2017 The built in Delete Folder command does bring up a pop up dialog and the script can not continue.delete folder("C:\\Users\\xxxxx\\xxxx\\Documents\\temp")Results in a confirmation dialog to delete yes or no. Nothing automated about that, you would have to have another thread running constantly looking for that dialog box and clicking yes. There must be a better way to suppress that dialog. Quote Link to post Share on other sites
Denethor 1 Posted April 18, 2017 Report Share Posted April 18, 2017 try use shell command set(#Folder,"{$special folder("Desktop")}\\test\\test","Global") shell("cmd /c RD /Q \"{#Folder}\"") more infohttp://www.sevenforums.com/tutorials/55721-folder-delete-command-prompt.htmlIn Windows 8+ the command has changed slightly, you no longer need the cmd /cshell("RD /Q \"{#Folder}\"") and if the folder is not empty then you need to add the /s option like thisshell("RD /Q /S \"{#Folder}\"") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.