How to Completely Delete Any Windows File Using SDelete
Files deleted from your PC may still be recoverable, at least for a short time. To make sure they're gone forever, you can use SDelete. This command-line utility securely erases data, making it unrecoverable.
What is SDelete?
When you delete a file, your computer simply marks the space it occupied as unallocated. This means that until another application writes data into that space, the contents can be recovered using data recovery tools.
SDelete can ensure that deleted files cannot be recovered. This command-line utility not only deletes existing files, but also removes previously deleted data that remains in unallocated areas of the drive. It securely erases data using the DOD 5220.22-M strong data deletion standard, recommended by the U.S. Department of Defense. It works by overwriting file data on disk clusters.
How to install SDelete
To get started, visit the Microsoft Sysinternal site. Click Download SDelete to save the compressed file to your local drive. Right-click the downloaded file, select Extract All , select a destination folder, and then click Extract .
Since SDelete is a command-line utility, it does not work like a regular application with a graphical interface. To set it up, first move the unzipped SDelete folder into the C:Program Files folder . Once done, follow these steps:
1. Click Start , type view advanced system settings and open the best match.
2. Select Environment Variables .
3. In System variables , select the Path line and choose Edit .
4. Select New to add a new line, then click Browse . Navigate to C:Program Files and select the SDelete folder .
5. Click OK on all open dialog boxes.
After configuring SDelete, launch the tool and see how it works.
1. Click Start , type cmd , right-click Command Prompt and select Run as Administrator .
2. Type SDelete and press Enter in the Command Prompt window to launch the tool. You will also see the SDelete License Agreement dialog box when the tool is run for the first time. Click Agree to close the dialog box.
How to use SDelete to delete files permanently
Before you begin, you should back up your data. Also, consider testing SDelete on a virtual machine first to minimize the risk of accidentally deleting important files. If you don't already have a virtual machine, you can easily set one up on a Windows PC for testing.
To get started, launch Command Prompt with admin privileges. In Command Prompt, type 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 free up disk space.
For this tutorial, we will be securely deleting an MP3 file located in the C:Media folder . 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 the Command Prompt, type SDelete followed by the file path. For example, the full command would look like this:
SDelete C:MediaOneMP3.mp3
Press Enter to execute the command. If successful, you will see the output:
Files deleted: 1
Next, try deleting the Media folder located in C: .
When deleting a directory, you need to include its subdirectories and handle any read-only attributes to ensure everything is cleaned up properly. To do this, use the SDelete command with the -s parameter to include subdirectories and -r to remove read-only attributes.
The full command would look like this:
SDelete -s -r C:Media
After running the command, the output will show the number of folders and files that have been deleted.
You should read it
- 2 ways to permanently delete files on Windows
- Delete the most 'stubborn' files on Windows
- Delete files on Mac directly without the Trash trash
- How to view recently deleted files on Windows 10?
- 6 ways to permanently delete files on Windows - You will not be able to get that file back again
- How to permanently delete Tik Tok account on the phone
- How to recover deleted files in Windows 10
- How to Delete DLL Files
May be interested
- How to remove XBox completely from Windows 10if you are trying to remove the xbox, you may notice there is no uninstall option there. the good news is you won't be stuck with the xbox. there is another way to delete this application.
- 2 ways to permanently delete files on Windowsnormally, when deleting a file on windows, the file will not be deleted immediately but will be saved in recycle bin. after that, you will have to do one more step to clear the trash. but if you do not want to take this second step, we will guide you how to permanently delete a file in the article below. please consult.
- How to assign permissions to delete any folder or file on Windows?in some cases when you delete a folder or file on a windows computer but cannot delete it and on the screen that displays an error message you need permission to perform this action. in order to be able to delete folders and files, you must assign permission permissions to delete them.
- Compress hiberfil.sys file to free up disk space on Windows 10file hiberfil.sys is one of the files consuming quite a lot of hard drive space on your computer. hibernate uses hiberfil.sys files to store the current state (memory) of the computer, so the hiberfil.sys file is managed by windows so you cannot delete these files in a way that is clear. often.
- What is Hiberfil file and how to delete Hiberfil.sys in Windowsare you searching for this article because you find a huge hiberfil.sys file on the system drive? you tried to delete it, but the file in use dialog box shows 'the action can't be completed because the file is open in another program. close the file and try again'.
- 'Unlock' file in Windowssuppose you want to edit a file, you may want to name it, move it to another location or delete it completely. however, you have a problem when editing, windows will notify you that another process has locked your file. so what to do?
- How to delete folder and file search history on File Explorerclearing file explorer history deletes information windows has saved about the files and folders you use, as well as what you've typed into the address bar and run dialog box.
- How to view recently deleted files on Windows 10?usually when you delete any file on a windows 10 computer by right-clicking on the file and selecting delete or selecting the file then pressing the delete key, then the file will be moved to recycle bin. or another way to permanently delete files is to press shift + delete, and windows will move these files from recycle bin.
- Fix the error that OneDrive files or folders could not be deletedonedrive is quite popular among windows 10 users due to its ability to connect multiple devices and keep files in sync between them. however, sometimes it will crash and prevent you from deleting files or folders.
- How to delete a Windows Service on Windows 7, 8, 10, Vista and Windows XPwith a large number of services in the list, there is no role, nor can it be used for anything, you can completely delete that service permanently instead of disabling it.