Thứ Hai, Tháng Hai 10, 2025
spot_img
HomeTechnologyHow to completely delete any Windows file using SDelete

How to completely delete any Windows file using SDelete

Files deleted from your PC can still be recovered, at least temporarily. To ensure that files are permanently deleted, you can use SDelete. This command-line utility securely erases data, making it unrecoverable.

What is SDelete?

When you delete a file, the computer simply marks the space occupied by the data as unallocated. This means that until another application overwrites data in that space, the content is recoverable using data recovery tools.

SDelete can ensure deleted files are not recovered. This command-line utility not only deletes existing files, but also removes previously deleted data left in unallocated portions of the drive. This tool securely erases data using the robust DOD 5220.22-M data erasure standard, recommended by the US Department of Defense. This tool works by overwriting file data on cluster disks.

How to install SDelete

To get started, visit the Microsoft Sysinternal site. Click Download SDelete to save the compressed file to the local drive. Right click on the downloaded file, select Extract Allselect the destination folder, then click Extract.

SDelete download page
SDelete download page

Since SDelete is a command-line utility, it does not function like a regular application with a graphical interface. To set up, first move the extracted SDelete folder into the folder C:\Program Files. Once completed, follow these steps:

1. Click Startenter view advanced system settings and open the best match.

2. Select Environment Variables.

3. In System variablesselect line Path and choose Edit.

4. Select New to add a new line, then click Browse. Navigate to C:\Program Files and select folder SDelete.

5. Click OK on all open dialog boxes.

Xem thêm  Latest Ninja Tien Len code and how to enter the code

After configuring SDelete, launch the tool and see how it works.

1. Click Startenter cmdright click Command Prompt and choose Run as Administrator.

2. Enter SDelete and press Enter in the Command Prompt window to launch the tool. You will also see a dialog box SDelete License Agreement when the tool is run for the first time. Click Agree to close the dialog box.

SDelete command in Command Prompt
SDelete command in Command Prompt

How to use SDelete to permanently delete files

Before starting, you should back up your data. Additionally, consider testing SDelete on a virtual machine first to minimize the risk of accidentally deleting important files. If you don't have a virtual machine, you can easily set it up on your Windows PC for testing.

To get started, launch Command Prompt with admin rights. In Command Prompt, enter SDelete and press Enter to launch the tool. This will display a list of parameters and arguments that you can use with the SDelete command to securely delete files and clean up disk space.

For this tutorial, we will safely delete the MP3 file located in the folder C: Media. Open File Explorer, locate and right-click the MP3 file, then select Copy as Path to copy the full file path of that file.

Next, in Command Prompt, enter SDelete followed by the file path. For example, the full command would look like this:

SDelete C:\Media\OneMP3.mp3
SDelete command in Command Prompt
SDelete command in Command Prompt

Press Enter to execute the command. If successful, you will see the output:

Files deleted: 1

Next, try deleting the folder Media lies within C:\.

When deleting a folder, you need to include its subfolders and handle any read-only attributes to ensure everything is cleaned up properly. To do this, use the SDelete command with parameters -S to include subfolders and -r to remove read-only properties.

Xem thêm  8 ways to fix Microsoft Visual C++ installation error 0x80240017 on Windows

The full command will look like this:

SDelete -s -r C:\Media

After running the command, the output will display the number of folders and files that have been deleted.

SDelete command in Command Prompt
SDelete command in Command Prompt
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments