Jump to content

Cclenear comand line option to accept /DELETE


pattone

Recommended Posts

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 command that I'm running is: 

Quote

ccleaner.exe /DELETE "C:\Users\Usuario\Downloads\*.*" /METHOD 1

image.jpeg.6660feb2f22afafc5a4f9911a06e50f5.jpeg

Link to comment
Share on other sites

  • Moderators

I don't call CCleaner from my own cleaning batch file.

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.

eg. For your example above I'd use:

Del /q C:\Users\Usuario\Downloads\*.* >nul 2>nul

/q stops it asking to delete each file.

You could also use /s after the /q to clear any subdirectories.

https://www.lifewire.com/delete-command-2625859

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.

*** Out of Beer Error ->->-> Recovering Memory ***

Worried about 'Tracking Files'? Worried about why some files come back after cleaning? See this link:
https://community.ccleaner.com/topic/52668-tracking-files/?tab=comments#comment-300043

 

Link to comment
Share on other sites

39 minutes ago, nukecad said:

I don't call CCleaner from my own cleaning batch file.

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.

eg. For your example above I'd use:

Del /q C:\Users\Usuario\Downloads\*.* >nul 2>nul

/q stops it asking to delete each file.

You could also use /s after the /q to clear any subdirectories.

https://www.lifewire.com/delete-command-2625859

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.

 

I'm trying to use Ccleaner with the /METHOD 1 parameter for secure erase; "del" command doesn't execute a secure erase

https://support.ccleaner.com/s/article/command-line-parameters-for-ccleaner-for-windows?language=en_US

Edited by pattone
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.