Make Undeletable, Unrenamable Folders

Have you ever wondered how you can make a folder which neither can be deleted nor be renamed. Well, if you have, then you have come to the right place. With this trick, you will be able to create folders in Windows which cannot be renamed or deleted.

Basic Concept
The basic concept behind this trick is the use of Keywords. Keywords are reserved words in any programming language that cannot be used as names of variables. Windows also uses certain keywords in its programming. Some of them are con, aux, lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8 and lpt9.

Make Undeletable and unrenamable folders

A Test
To test this concept, make a new folder in Windows and try to give it a name same as any of the keyword mentioned above.

Windows will not rename your folder to any of the keyword given above.

So the question arises, how can we make a folder with a keyword as its name? The solution to this problem is included in Windows itself. As we know that Windows has evolved from D.O.S. (Disk Operating System), its commands can be used in Windows. You can use D.O.S. programming in Windows to create a folder with a keyword as its name using the steps given below:-

  1. Press Windows Key + R.
  2. Type CMD and press Ctrl+Shift+Enter to Run the Command Prompt as an Administrator (Elevated Command Prompt.)
  3. In the Command Prompt window that opens, type the name of the drive in which you wish to create your folder in the format <drive-name>: and press Enter. e.g. If you wish to create the undeletable folder in the D drive, type "D:" without the quotes and press Enter. (In this tutorial, making such folders only in the root of drives is being explained but you can create such undeletable folders in any active directory you want with the CD command.)
  4. Type the command- "md con\" or "md lpt1\" without the quotes and press Enter. You can choose any of the keywords given above as the name of your folder.

Now Windows will create an undeletable, unrenamable folder in the directory you entered in Step 3. However, the folder can be renamed to another keyword using Windows Explorer in Windows 8.1 and earlier editions of Windows.

Deleting the Folder

Although, it is not possible to manually delete the folder, you can delete the folder by typing "rd con\" or "rd lpt1\" in Step 4 instead of "md con\" or "md lpt1\" if you so wish.

Windows Compatibility: This works on Windows XP, Windows Vista, Windows 7, Windows 8 and Windows 8.1. This partially works on Windows 10 as the folders become inaccessible.

Try this trick yourself to create one such folder which can neither be deleted nor be renamed.

Reader Comments

Martin said...

Since morning I've been creating this whole folder thing as your
steps suggest but each time i delete it, it disappears. What am i not
getting right here

Akhilesh said...

Do not delete it with the D.O.S. code. It is given in case you wish to delete the folder. If you try to delete it with normal Windows Explorer, it will not be deleted.

Author About

Akhilesh Sharma maintains and writes Tweak And Trick. He is a technology enthusiast and a science student.
You can contact him at

Featured Posts