Friday, May 22, 2009

A simple file shredder for Windows

Working with sensitive data all day long you come to realize that what I download needs to be deleted securely, just as the paper copies need to destroyed securely.

I happened upon this script on Lifehacker a while ago, but I have been using it more and more lately.

First you will need to download sdelete from Microsoft. I copy this exe to the Windows directory on each machine as part of my install process.

The script if very simple:
@echo off
FOR %%F IN (%1 %2 %3 %4 %5 %6 %7 %8 %9 %10) DO sdelete -p 7 -s %%F

I save this as shred.cmd and place it in my C:\Scripts folder. It will take up to 10 files at a time and run sdelete with 7 passes on each file. Sdelete will also rename the file 26 times to obfuscate the file name.

About once a month I will run sdelete -p 3 -z to clean the free space on my PC and to make sure that any temp files I didn't shred are cleaned up. Now this won't obfuscate the file names at all, but the contents of the files are gone for good.

You can also place a short cut to the shred.cmd file into your Send To menu options and have an easy way to clean files from any folder.

No comments: