Jump to content
UBot Underground

Delete Folder Question


Recommended Posts

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

Link to post
Share on other sites

try use shell command

set(#Folder,"{$special folder("Desktop")}\\test\\test","Global")
shell("cmd /c RD /Q \"{#Folder}\"")

more info

http://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.

Link to post
Share on other sites
  • 11 months later...

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.

Link to post
Share on other sites

try use shell command

set(#Folder,"{$special folder("Desktop")}\\test\\test","Global")
shell("cmd /c RD /Q \"{#Folder}\"")

more info

http://www.sevenforums.com/tutorials/55721-folder-delete-command-prompt.html

In Windows 8+ the command has changed slightly, you no longer need the cmd /c

shell("RD /Q \"{#Folder}\"")

 

and if the folder is not empty then you need to add the /s option like this

shell("RD /Q /S \"{#Folder}\"")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...