Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a built-in cmd command/utility on Windows that can shred files (delete and overwrite with random data) without the need to use third party software? In linux i would use shred. It a wonderful tool that not only deletes files, but also destroys any "residue" left on the disk by overwriting the data.

share|improve this question
    
I've never heard of anything "built in" to Windows. A major problem is that if you attempt to overwrite the file the file system may allocate the "overwritten" version in different space from the original, leaving the original untouched. So it takes some significant low-level understanding of the specific system and its configuration. (And this is doubly true if the "disk" is a SSD.) –  Daniel R Hicks Sep 6 '12 at 21:00
1  
Microsoft offers an addon program (sdelete) that runs from the command line....technet.microsoft.com/en-us/magazine/dd334519.aspx –  Moab Sep 6 '12 at 21:09
    
Sdelete can be scripted also...forum.sysinternals.com/topic6065.html –  Moab Sep 6 '12 at 21:11
    
@Moab That program, according to the cover page, overwrites free space -- not quite the same thing. –  Daniel R Hicks Sep 6 '12 at 21:11
    
@DanH its more powerful than that...brighthub.com/computing/smb-security/articles/46693.aspx –  Moab Sep 6 '12 at 21:13
show 2 more comments

migrated from security.stackexchange.com Sep 6 '12 at 20:56

This question came from our site for Information security professionals.

4 Answers

up vote 2 down vote accepted

Probably not. Unless they added one in Win 8

I recently purchased a new Pc with Win 7, the manufacturer bundled a third party shredder application. I infer that either there isn't one as standard (and I've never heard of one) or (less likely?) that the manufacturer added some unnecessary bloatware without the usual sliver of justification.

It's hard to prove a negative though.


Notes:

  1. Shred only overwrites a file, it doesn't seek out fragments and copies of the data in unallocated disk space (caused by editing etc).

  2. You don't need to overwrite a file more than once. Statements to the contrary have been thoroughly debunked long ago.

  3. It doesn't matter what you overwrite it with.

So just copying a sufficiently large but innocuous file over the top will suffice.


Update

You could delete the file then use cipher

  1. Quit all programs.
  2. Click Start, click Run, type cmd, and then press ENTER.
  3. Type cipher /w:driveletter:\foldername, and then press ENTER. Specify the drive and the folder that identifies the volume that contains the deleted data that you want to overwrite. Data that is not allocated to files or folders will be overwritten. This permanently removes the data. This can take a long time if you are overwriting a large space.

It's probably quicker to just copy a big file over the sensitive file, but safer to clear unallocated space.

share|improve this answer
    
nice approach, i use to do exactly that, after using some pro data recovery tools, like recovermyfiles from GetData, i created a small c# program that create dummy data, by specifying the size, to defeat such tools. thanks for your help, i wish i could vote up, but i cant, (still new to super user). regards. –  sarepta Sep 6 '12 at 22:19
    
Interesting, I learned something today. Thanks for this! –  Mark Allen Sep 6 '12 at 22:33
add comment

Piriform's CCleaner offers an option to wipe out free space. File Shredder allows to wipe out a particular file "on deletion time"

**EDIT: Found something on MS' sysinternas. SDelete. Haven't tried but could give it a try.

share|improve this answer
    
already using it, for like 6 years :-), i just want to make sure there is no Microsoft standard for doing such a sensitive task. –  sarepta Sep 6 '12 at 21:38
    
Found something else. Check it out to see if it helps –  Alfabravo Sep 6 '12 at 21:51
    
already checked it, given by @Moab in the above comments, found it useful, thanks for your interest. –  sarepta Sep 6 '12 at 22:00
    
+1 for Sysinternal's SDelete. –  ultrasawblade Sep 6 '12 at 22:10
    
@sarepta MS is not great at providing standard tools for common tasks. Even when it does, third-party tools are often better. Windows is one platform where you shouldn't worry too much about sticking with the "official" way of doing things. –  Isaac Rabinovitch Sep 6 '12 at 22:26
show 2 more comments

If you consider Powershell to be built-in, then it is possible to write a script let, maybe using Get-Random to overwrite the content of a file with random values, before deleting it.

This stack overflow question might be useful.

share|improve this answer
    
have a complete functional c# program if you want (its a tiny-program not a full fledged one). –  sarepta Sep 6 '12 at 22:28
add comment

I'm stealing this answer from Alfabravo, but I think the best answer to this question involves SDelete. I say that because Sarpeta's question is partly about doing things "the Microsoft way" and SDelete is more or less an MS product. Like many other Sysinternals tools, it's something that MS really ought to fold into Windows instead of making us download it separately.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.