jimbourekas@yahoo.gr 1 Posted January 21, 2013 Report Share Posted January 21, 2013 Hello there, I noticed that the "Delete File" command sends the files to the Recycle Bin. I need to properly delete a file. Any ideas? jim Quote Link to post Share on other sites
rocket976 62 Posted January 22, 2013 Report Share Posted January 22, 2013 rd /s /q c:\$Recycle.Bin not sure how to run that from shell though wouldnt mind knowing.. Quote Link to post Share on other sites
jimbourekas@yahoo.gr 1 Posted January 22, 2013 Author Report Share Posted January 22, 2013 Does this actually delete the whole Recycle Bin index? Quote Link to post Share on other sites
Legend 181 Posted January 22, 2013 Report Share Posted January 22, 2013 Does this actually delete the whole Recycle Bin index? That command clears out the $Recycle.bin folder from the C:\ partition. It permanently deletes all files and folders which are in the Recycle Bin (from all user accounts in the system) and cannot be recovered. Quote Link to post Share on other sites
abbas786 78 Posted January 22, 2013 Report Share Posted January 22, 2013 Here is the solutionshell("cmd.exe /c DEL /F /S /Q \"Path of ur file") Quote Link to post Share on other sites
Legend 181 Posted January 23, 2013 Report Share Posted January 23, 2013 shell("cmd.exe /c DEL /F /S /Q C:\\Users\\UBOT\\Desktop\\Boxfile.txt") worked for me... but leaves the command window open on the taskbar... Quote Link to post Share on other sites
illmill 87 Posted January 23, 2013 Report Share Posted January 23, 2013 On this note, when I have a delete folder or delete file command it prompts me to ask if I want to really delete. Is there a way to make it so this prompt doesn't happen and it just deletes files? Quote Link to post Share on other sites
Legend 181 Posted January 23, 2013 Report Share Posted January 23, 2013 For the del command you can mix and match any of these attributes: /p : Prompts you for confirmation before deleting the specified file./f : Forces deletion of read-only files./s : Deletes specified files from the current directory and all subdirectories. Displays the names of the files as they are being deleted./q : Specifies quiet mode. You are not prompted for delete confirmation./a : Deletes files based on specified attributes. Quote Link to post Share on other sites
jimbourekas@yahoo.gr 1 Posted February 14, 2013 Author Report Share Posted February 14, 2013 Follow these instructions for a completely silent solution: Create a file del_file.vbs using your notepad Put these contents inside: set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(WScript.Arguments(0)) Then fso.DeleteFile(WScript.Arguments(0)) End If Create a ubot command using the following code: define delete_vbs(#filepath) { shell("wscript.exe \"{$special folder("Application")}\\del_file.vbs\" \"{#filepath}\"") } Put the .vbs file in the same folder as your ubot script To delete a file, just call the command: delete_vbs("c:\\myfile.txt") The file gets deleted silently. If it does not exist then nothing happens.Enjoy Quote Link to post Share on other sites
nancy30 0 Posted February 15, 2013 Report Share Posted February 15, 2013 you may limit the size of recycle bin all files will be deleted automatically. Quote Link to post Share on other sites
Enigma 78 Posted October 10, 2015 Report Share Posted October 10, 2015 Follow these instructions for a completely silent solution: Create a file del_file.vbs using your notepad Put these contents inside: set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(WScript.Arguments(0)) Then fso.DeleteFile(WScript.Arguments(0)) End If Create a ubot command using the following code: define delete_vbs(#filepath) { shell("wscript.exe \"{$special folder("Application")}\\del_file.vbs\" \"{#filepath}\"") } Put the .vbs file in the same folder as your ubot script To delete a file, just call the command: delete_vbs("c:\\myfile.txt") The file gets deleted silently. If it does not exist then nothing happens.Enjoy Doesn't work.... Anyone able to give a REAL solution for this??? My gosh i thought uBot is for AUTOMATION but with the delete folder command in uBot STILL requires you to agree with file deletion popup.Sighhhh Quote Link to post Share on other sites
Fer 26 Posted October 11, 2015 Report Share Posted October 11, 2015 Making a command for this on my plugin Quote Link to post Share on other sites
Fer 26 Posted October 11, 2015 Report Share Posted October 11, 2015 https://www.dropbox.com/s/wiibkiib75iqlm0/Fer%27s%20Plugin.dll?dl=0 "delete" is the command for it. 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.