Guide: CCleaner Secure Delete Script
Since version 2.15.815, CCleaner’s Secure Delete feature can be accesed via a command line option. It’s very useful, but for most users it’s a drag to open a command line window and to run the ccleaner.exe binary with the file/folder to delete as a parameter. The process can be simplified if CCleaner’s directory is added to the PATH environment variable, so that you don’t have to enter the full path to ccleaner.exe. Still, we can do better than that…
Introducing the CCleaner Secure Delete script, a simple script for the Windows command line shell. Simply unzip the script on your desktop or another handy location, then drag files or folder you wish to delete onto it. The script will tell you what is about to be deleted, than call ccleaner.exe. If you’re sure, confirm CCleaner’s dialog and that’s it!
Any suggestions or tips are welcome.
You can either download the script, or create it yourself (just make sure you give the file a .cmd extension). Here’s the script’s contents:
echo Secure deleting file/folder…
echo %1
“C:\Program Files\CCleaner\ccleaner.exe” /delete %1
echo Deleting…
echo Operation completed!
pause
Note: If you have installed CCleaner somewhere other than the default location, you will need to edit the script and put in the correct installation path.
Note 2: A similar result can be achieved by creating a shortcut to ccleaner.exe and changing its “target”, like in this screenshot (add a space and the text “/delete” after the double quote at the end). You can add a comment as well (it will be displayed when you place your mouse pointer over the shortcut icon). don’t forget to name the shortcut something meaningful such as “Secure Delete with Ccleaner”.

April 20th, 2009 at 2:02 am
Thanks for the ccleaner delete script, but it appears all but superflous to me: One can do almost the same thing, by selecting a group of files in most file managers (I use xplorer2) and hitting the key. One might use ccleaner for this, only if one wants the delete more “secure” - and file managers do this too.
The real deficiency is (for unfanthomable reasons to me) ccleaner lets on specify entire folders, or specific (entire) filenames to delete each time it is run. But one cannot add to this list a group of files, defined by wildcards. That is, you can not instruct it to delete, say, all the files, c:\somedirectory\*.log as part of its normal other cleaning operations. Your script requires a separate ccleaner command, just to do this alone.
Any ideas on how to tell ccleaner to delete multiple files as part of normal operations? Can can imagine a clumsy script like this:
for %%s in (*.log *.chk *.tmp) do ccleaner.exe /delete c:\somedirectory\%%s
ccleaner
Which runs ccleaner multiple times in “secure delete” mode and then runs it normally. Can you think of something more
efficient or better?
April 21st, 2009 at 5:25 pm
The option you asked about is not available in CCleaner
However, while preparing an upcoming post on FCleaner, I noticed that its Options section includes an advanced custom cleaner panel with custom folder, wildcard and exclusion filters. Should be right up your alley.