EXAMPLE: DEL and ERASE Command
NOTE: You can use either the DEL or ERASE command in the command prompt. They are the same command.
NOTE: This will allow you to delete any file(s) on the computer.
NOTE: This will only allow you to delete any file(s) in your user folders.
NOTE: This will allow you to delete any file(s) on the computer.
6. To Delete a Specific File in Command Prompt
NOTE: This will not ask you if it's ok (Y/N) to delete each file when deleting all files in a folder and the folder's subfolders.
NOTE: This will ask you if it's ok (Y/N) to delete each file when deleting all files in a folder and the folder's subfolders.
NOTE: This will not ask you if it's ok (Y/N) to delete each file when deleting all files with a specified file extension in a folder and the folder's subfolders.
NOTE: This will ask you if it's ok (Y/N) to delete each file when deleting all files with a specified file extension in a folder and the folder's subfolders.
NOTE: You can use either the DEL or ERASE command in the command prompt. They are the same command.
2. To Use a Elevated Command Prompt in Windows
NOTE: This will allow you to delete any file(s) on the computer.
A) Open Folder Options, uncheck the Hide extensions for known file types box, and click on OK. (see screenshot below)3. To Use a Command Prompt in Windows
C) Go to step 5.
NOTE: This will only allow you to delete any file(s) in your user folders.
A) Open Folder Options, uncheck the Hide extensions for known file types box, and click on OK. (see screenshot below)4. To Use a Command Prompt at Boot
B) Open a command prompt.
C) Go to step 5.
NOTE: This will allow you to delete any file(s) on the computer.
A) Open a command prompt at boot.5. Do step 6, 7, 8, 9, or 10 for how you would like to delete your file(s).
B) In the command prompt, type diskpart and press Enter. (see screenshot below)
C) In the command prompt, type list volume and press Enter. (see screenshot below)
NOTE: This will let you see what the drive letter is for the drive that you want to delete the file in since it may not always be the same drive letter that it is in Windows.
D) After making note of the drive letter, type exit and press Enter. (see screenshot below)
E) Go to step 5.
6. To Delete a Specific File in Command Prompt
A) In the command prompt, type the command below and press enter.7. To Delete All Files in a Folder without Confirmation in Command Prompt
NOTE: Substitute Full Path of File with extension within quotes below with your files's full path and name with the extension included within quotes instead.
NOTE: For example, if I wanted to delete a text file named File with the file extension .txt on my desktop, I would type this command below.Code:DEL /F /S /Q /A "Full Path of File with extension"
B) Go to step 11.Code:DEL /F /S /Q /A "C:\Users\UserName\Desktop\File.txt"
NOTE: This will not ask you if it's ok (Y/N) to delete each file when deleting all files in a folder and the folder's subfolders.
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with the full path of the folder that you want to delete all files in.
NOTE: For example, if I wanted to delete all files in my D:\Projects folder and subfolders, I would type this command below.Code:DEL /F /S /Q /A "Full Path of Folder\*"
Code:DEL /F /S /Q /A "D:\Projects\*"
B) Go to step 11.8. To Delete All Files in a Folder with Confirmation in Command Prompt
NOTE: This will ask you if it's ok (Y/N) to delete each file when deleting all files in a folder and the folder's subfolders.
A) In the command prompt, type the command below and press enter.9. To Delete All Files with a Specified File Extension in a Folder without Confirmation in Command Prompt
NOTE: Substitute Full Path of Folder within quotes below with the full path of the folder that you want to delete all files in.
NOTE: For example, if I wanted to delete all files in my D:\Projects folder and subfolders, I would type this command below.Code:DEL /P /F /S /A "Full Path of Folder\*"
B) Go to step 11.Code:DEL /P /F /S /A "D:\Projects\*"
NOTE: This will not ask you if it's ok (Y/N) to delete each file when deleting all files with a specified file extension in a folder and the folder's subfolders.
A) In the command prompt, type the command below and press enter.
NOTE: Substitute Full Path of Folder within quotes below with the full path of the folder that you want to delete all files in. Substitute extension with the file extension of the type of files that you want to delete in the folder and it's subfolders.
NOTE: For example, if I wanted to delete all txt (text) files in my D:\Projects folder and subfolders, I would type this command below.Code:DEL /F /S /Q /A "Full Path of Folder\*.extension"
Code:DEL /F /S /Q /A "D:\Projects\*.txt"
B) Go to step 11.10. To Delete All Files with a Specified File Extension in a Folder with Confirmation in Command Prompt
NOTE: This will ask you if it's ok (Y/N) to delete each file when deleting all files with a specified file extension in a folder and the folder's subfolders.
A) In the command prompt, type the command below and press enter.11. The file(s) should now be deleted.
NOTE: Substitute Full Path of Folder within quotes below with the full path of the folder that you want to delete all files in. Substitute extension with the file extension of the type of files that you want to delete in the folder and it's subfolders.
NOTE: For example, if I wanted to delete all txt (text) files in my D:\Projects folder and subfolders, I would type this command below.Code:DEL /P /F /S /A "Full Path of Folder\*.extension"
Code:DEL /P /F /S /A "D:\Projects\*.txt"