This basic guide describes in detail how to delete a file (folder) in Windows (several ways): from simple deletion to guaranteed deletion with protection from data recovery programs.
Contents
- Delete file to “Recycle Bin”
- Permanent delete
- Guaranteed file deletion
- Delete via Command promt
- Delete via PowerShell
- Comparison table
Article in other languages:
?? – Cómo eliminar un archivo en Windows (varias formas)
?? – Как удалить файл в Windows (несколько способов)
Delete file to “Recycle Bin”
? To select multiple files or folders, hold the special button and press the left mouse button:
- Сtrl — highlight a specific file or folder;
- Shift — selection of a range of files or folders.
How to delete a file (folder) using the menu
- Right-click on a document or folder;
- Select the Delete item;
- Click Yes in the confirmation request.
The file will be deleted to the Recycle Bin.
How to delete a file (folder) using the button
- Highlight a document;
- Press the Del key;
- Click Yes in the confirmation request.
The file will be deleted to the Recycle Bin.
Disable (enable) delete confirmation
- Click on the Recycle Bin can icon with the right mouse button;
- Select Properties;
- Disable the Display delete confirmation dialog.
? If you just deleted the desired file, press the key combination Ctrl + Z. This will undo your last action in Windows, the deleted file or folder will return to its place.
How to recovery files from Recycle Bin
- Open the Recycle Bin;
- Select the desired file or folder;
- Right click on the selected file;
- Select Recover.
The file will be restored to the folder from which it was deleted.
You can transfer the file (or folder) from the Recycle Bin to the folder you need.
Click and hold the left mouse button on the selected file and drag it to the folder or Desktop you need.
How to empty Recycle Bin
You can delete all files from the Recycle Bin.
- Click on the Recycle Bin with the right mouse button;
- Click Empty Recycle Bin.
How to permanent Delete
- Highlight a file or folder;
- Press the key combination Shift + Del;
- Click Yes in the confirmation request.
Guaranteed file deletion
Guaranteed deletion of data on the active disk
For guaranteed data deletion, we use the standard CIPHER utility.
Cipher.exe is a command-line tool (included with Windows 2000) that you can use to manage encrypted data by using the Encrypting File System (EFS)
Microsoft support
? To overwrite as much data as possible, it is recommended that you close all other applications while running CIPHER / W.
- Run the command prompt as administrator;
- We launch the CIPHER command with the necessary keys.
cipher /W:X
/W — key, deletes data from available unused disk space in the entire volume. The content is overwritten in three stages, with values: 00, FF and a random number.
:X — work volume label.
Guaranteed data deletion on inactive devices
For guaranteed data deletion on inactive devices: unused hard disks, portable hard disks and flash devices, we use the standard FORMAT utility.
- Run the command prompt as administrator;
- We start the format command with the necessary keys.
format X: /P:count
X – specifies the drive letter (followed by a colon), mount point, or volume name.
/P:count — zero every sector on the volume. After that, the volume will be overwritten “count” times using a different random number each time. If “count” is zero, no additional overwrites are made after zeroing every sector.
To run the utility successfully, you must enter the correct label of the active volume/device.
The process can take a long time, especially if a large number is indicated in the rewrite counter.
Delete via the Command prompt
How to delete a file via command prompt
- Run the command prompt;
- Go to the desired folder (cd command);
- Run the del command and the fully qualified file name with the extension.
del mydoc.txt
If there are spaces in the file name, enclose the name in quotation marks.
To delete files from system directories, you must run the command prompt as administrator.
How to delete a folder via command prompt
- Run the command prompt;
- Go to the desired folder;
- Run the RD command.
rd "folder name" /S
/S – removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree.
If there are spaces in the directory name, enclose the name in quotation marks.
To delete directory from system directories, you must run the command prompt as administrator.
Delete via PowerShell
The PowerShell command to delete folders and files is Remove-Item.
The synonyms of the Remove-Item command are: del, erase, rd, ri, rm and rmdir, so commands from the Windows command prompt will also work.
Remove-Item "X" -Recurse
X – full path to the file (with extension) or folder.
Recurse – the key indicating the deletion of the content folder.
Comparison table of options how to delete a file
Comparison table on how to delete files and folders.
Deleting data to the Recycle Bin | Deleted data can be restored from the Recycle Bin folder on the Desktop. |
Permanent data deletion | Deleted data can only be restored using special programs. |
Guaranteed data deletion | Deleted data cannot be recovered even by special data recovery programs. But special services and laboratories can still recover deleted data. |
How to delete a file (folder) in Windows was discussed in this article. I hope that now you can delete files or folders in different ways, including guaranteed deletion of files beyond recovery with special programs. However, if you run into any problems, do not hesitate to write in the comments. I will try to help.