Use SDelete to Permanently Delete Files in Windows

Ads by Google

Do you know that whenever you permanently delete a file from your PC (by using Shift+delete or emptying the recycle bin), it actually doesn’t get deleted. Windows just removes the index for that file. And hence tools like Recuva and Winutilities can easily recover them.

If you intend to permanently delete a file in Windows then the command line utility called SDelete, one of the sysinternals tools provided by Microsoft, is the solution. It can overwrite the contents of free space on your disk so that no one can recover data using a third party application.

sdelete to permanently delete windows files

How to use SDelete to overwrite deleted files on the C drive

According to SDelete

Securely deleting a file that has no special attributes is relatively straight-forward: the secure delete program simply overwrites the file with the secure delete pattern.

SDelete relies on the defragmentation API. Using the defragmentation API, SDelete can determine precisely which clusters on a disk are occupied by data belonging to compressed, sparse and encrypted files. Once SDelete knows which clusters contain the file’s data, it can open the disk for raw access and overwrite those clusters.

Here are the steps to overwrite deleted files:

1. Download the zip file and extract sdelete.exe file on your computer.

2. Press Start button, type cmd in the search box and press “Enter”.

cmd start

3. Command prompt window will appear.

Ads by Google

sdelete command prompt

4. Now move the SDelete.exe file in the C:\User\Name directory where “Name” is your windows username.

You can enter in this directory by clicking on the top right link in the start menu.

start menu

Now in the command prompt type the command given below and press enter (see the screenshot below).

sdelete -z C:

sdelete command1

It will start cleaning free space on the C drive. It actually performs a secure overwrite by cleaning up the disk space and removing any deleted files that might be present.

sdelete cleaning

Similarly, you can change the command and overwrite deleted files on other drives.

That’s how you can use this small utility (only 47 KB in size) to permanently delete files on your Windows computer. You don’t even need to install it. It is a portable utility and you can take it along with you in a USB drive.

Download SDelete to permanently delete data on Windows.

Get Guiding Tech articles delivered to your inbox.

We will never share your address. Unsubscribe at any time.

Post a Comment or Discuss at Guiding Tech Forums

Show archived comments (11)

Archived Comments

  1. Phorstman says:

    Hi can you please help me out:
    After pressing enter, i get the following comment:
    “sdelete is not recognized as an internal or external command, operable program, or batch file.”
    How do I fix this?

    • One who replies says:

      I think it means that you did not move the file to file to C:UserName directory where “Name” is your windows username. open up that file then drag the sdelete document (not the folder, the actual document) into the C:UserName directory. You see how in the cmd program it says this: “C:UserHimanshu>”? That means the program is going to look in that and only that folder. If the program is not in that folder (sdelete) it won’t work. Even if there is a folder within that folder holding sdelete, it won’t work because it won’t look into the folder within the C:UserName folder. Get it? SO make sure to drag the program into the folder. Then when you put sdelete -z C:, add an extra : because if you don’t it will say “invalid drive letter: C Arguement must be formatted like d:”. So you must type sdelete -z C:: then press enter and let it run.

  2. jonnyxx says:

    just wondering why if you select zeroing (-z) it says “cleaning free space on (whatever drive). And if you select cleaning (-c) it says “cleaning free space on (whatever drive)
    Shouldn’t the -z option say “zeroing free space” It would make me more confortable it was doing what it was supposed to!! Cheers.

    • Ridhima says:

      can i ask u one question if i use -z ….that means it will clear all deleted files ? That means we don’t need to use sdelete command again and again ?

  3. Laurie Wilkes says:

    invalid drive letter c
    must be formatted like d

  4. Jeanne says:

    The hint to make sure you put the file itself into your C:usernamename directory was the key. That and the C:: for the drive name. Thanks for the walk thru.

  5. daviiu says:

    sdelete does not work “not recognized”

  6. Chris says:

    If you get the “Invalid Drive Letter C” message you need to put the whole drive name, like “Compaq (C:).

  7. roger pack says:

    to delete a folder for some reason I ended up having to use this syntax: sdelete.exe -s -r .folder-name-here

  8. Thanks! says:

    It didn’t work at first… but i figured out why… i forgot sdelete and then the -z C: thingy… thanks really helpful :3