Hi guys... I'm trying to run ccleaner in command line from a bat file and when I run it with the /DELETE /METHOD it ask me for confirmation like the picture attached... is there a way to accept that "DELETE" to run that command using Task Scheduler?
The two nul statements at the end of the line supress standard output and non critical errors from the screen. Without those it would output a list of all files deleted, or an error if the directory is already empty. Try it without them to see what I mean.
<div class="ipsQuote_contents">
<p>
I don't call CCleaner from my own cleaning batch file.
</p>
<p>
If you are cleaning all the files in a directory from a batch file then why not just use the "del" command with the /q option.
</p>
<p>
eg. For your example above I'd use:
</p>
<p>
Del /q C:\Users\Usuario\Downloads\*.* >nul 2>nul
</p>
<p>
/q stops it asking to delete each file.
</p>
<p>
You could also use /s after the /q to clear any subdirectories.
</p>
<p>
<a href="https://www.lifewire.com/delete-command-2625859" rel="external nofollow">https://www.lifewire.com/delete-command-2625859</a>
</p>
<p>
The two nul statements at the end of the line supress standard output and non critical errors from the screen. Without those it would output a list of all files deleted, or an error if the directory is already empty. Try it without them to see what I mean.
</p>
</div>
I'm trying to use Ccleaner with the /METHOD 1 parameter for secure erase; "del" command doesn't execute a secure erase