If you want to completely delete a folder in Windows without any possibility of recovery then use Cipher command. Let's look at one today analysis of this possibility.
Deleting files on a mechanical hard drive in Windows does not actually delete the files on it. Instead, it marks the files as no longer accessible and considers the space they occupied as free. The files remain recoverable until the system overwrites them with new data, which may take some time.
Even if you have deleted the data beyond the Recycle Bin it can be recovered with special programs recovery. The cipher command, however, wipes a folder, writing random data to it and making it unrecoverable without formatting the entire storage.
Cipher.exe is a Command Line tool (Command Prompt) of the Windows operating system. Microsoft designed the utility to encrypt and decrypt data from drives that use the NTFS file system.
However, you can also use it to replace deleted data to prevent recovery.
Writing a command
To completely erase deleted files without recovery in Windows 10 and 11, open a Command Prompt window with administrator rights and use the command:
cipher /w:DRIVE-LETTER:\FOLDER-PATH\
In the command, replace “DRIVE-LETTER” with the drive letter where the deleted contents reside, and replace “FOLDER-PATH” with the path to the folder to completely delete it from the hard drive.
For example, if you want to make all the former contents of the folder c:\iguru\dimitris unrecoverable you should write the command:
cipher /w:c:\iguru\dimitris
Frequent mistakes
The cipher command does NOT delete existing files in a folder. It just writes random data (ie encrypts) to the empty folder space that is reserved by old files that you have ALREADY deleted.
If you want to completely erase a folder, first delete its files inside it and then use the cipher command.
The cipher /w command does not work for files smaller than 1 KB. So make sure you check the file size to confirm if it is smaller from 1 KB.
Additional functions
Type the following command to replace the deleted data with multiple passes and press Enter :
cipher /w:DRIVE-LETTER:\FOLDER-PATH\ /p3
You can also change “3” for the number of passes you want to use. The higher the number, the longer it will take to complete the process.
Once you complete the steps, Cipher will overwrite the deleted data, making it very difficult for anyone to use recovery software to reconstruct and restore files and folders from the hard drive.