How do I delete a file, directory, or folder?
Microsoft Windows users can delete a folder several different ways, below is a listing of the different methods to delete a folder.
Note: Users not familiar with Windows should realize that if you delete a folder, it will delete all the files and folders within that directory.
Tip: The below steps are for deleting a single file, but the same steps can be applied to delete multiple files if you highlight multiple files before performing any of the below steps.
By far the easiest method of deleting files in Microsoft Windows is by locating the file, folder, shortcut, or other object you wish to delete, highlight it by clicking the file once, and press the del or delete key on the keyboard. You can browse to the location of the file or folder using either My Computer or Windows Explorer.
Delete file by right-clicking
Open My Computer or Windows Explorer, locate the file or folder you wish to delete and right-click the file or folder you wish to delete and click the delete option from the menu that appears after you have right-clicked the file or folder.
Delete from File menu
Problems during delete
Windows command line
See the below MS-DOS users section for information about deleting a file or folder at the Windows command line.
Before any of the steps below can be followed you must get to a prompt.
MS-DOS users can delete files using the del command. See this page to get additional information and help with this command.
Linux and Unix users can delete files through the console by using the rm command. See this page for additional information about this command.
Linux and Unix users can delete folders through the console by using the rmdir command. See this page for additional information about this command.
Like Microsoft Windows, Linux and Unix users can also delete files through the GUI by locating the file and pressing the delete key on the keyboard.
- Open File manager
- Locate the folder or file you wish to delete and click File and Delete.
See the above MS-DOS users section for information about creating a directory in MS-DOS.