How do I delete a file, directory, or folder?
Microsoft Windows users
MS-DOS and Windows command line users
Linux and Unix and variant users
Microsoft Windows 3.X users
Microsoft Windows users
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.
Delete key
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
Open My Computer or Windows Explorer, locate the file or folder you wish to delete, and click File from the drop down menu and then Delete.
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.
MS-DOS and Windows command line users
Before any of the steps below can be followed you must get to a prompt.
Files
MS-DOS users can delete files using the del command. See this page to get additional information and help with this command.
Folders
MS-DOS users can delete directories in MS-DOS using the deltree command or rmdir command. See either of these links for additional information about these commands.
Linux and Unix and variant users
Files
Linux and Unix users can delete files through the console by using the rm command. See this page for additional information about this command.
Folders
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.
File Manager
- Open File manager
- Locate the folder or file you wish to delete and click File and Delete.
MS-DOS
See the above MS-DOS users section for information about creating a directory in MS-DOS.