Short answer: you can make an "undeletable" folder in Windows by naming it with a reserved system name (like CON, PRN, or AUX) via Command Prompt, Windows refuses to delete or rename it normally. It is a fun trick, and here is exactly how to create one AND how to remove it again (the important part people forget).
Why some names are undeletable
Windows reserves certain names (CON, PRN, AUX, NUL, COM1-9, LPT1-9) for legacy devices. File Explorer will not let you create or delete a folder with these names, so a folder made this way via the command line resists normal deletion and renaming, which is what makes the trick work.
How to create one
- Open Command Prompt.
- Navigate to where you want it (e.g.
cd C:\Users\YourName\Desktop). - Create the folder using the special syntax:
md CON\
(The trailing backslash and the reserved name are what let it be created.) You now have a folder named CON that Explorer cannot delete normally.
How to remove it (do not skip this)
Since Explorer will not delete it, use Command Prompt with the same special syntax:
rd CON\
Run that from the folder's location and it removes the "undeletable" folder. This is the essential counterpart, know it before you make one, so you are never stuck with a folder you cannot get rid of.
Caution and caveats
| Note | Detail |
|---|---|
| Remove only via CMD | rd NAME\ with the reserved name |
| Not real protection | Anyone who knows the trick can delete it |
| Do not put vital files in it | You could complicate access |
The non-obvious tip: it is a novelty, not security
An undeletable folder is fun and can stop a casual person from deleting something, but it is not secure, anyone who knows this same command can remove it, and the contents are not protected at all. For preventing accidental deletion of real data, better options are setting folder permissions or, for privacy, encryption. Enjoy this as a neat Windows curiosity, not a protection method, and always remember the rd command to undo it.
Frequently asked questions
How do I make an undeletable folder in Windows?
In Command Prompt, use a reserved name with special syntax, for example 'md CON\'. Windows then refuses to delete or rename it through File Explorer.
How do I delete an undeletable folder?
Use Command Prompt with the same syntax: 'rd CON\' (matching the reserved name) from the folder's location. Explorer cannot remove it, but this can.
Why can't Windows delete certain folder names?
Names like CON, PRN, AUX and NUL are reserved for legacy devices, so File Explorer blocks creating or deleting folders with them.
Is an undeletable folder secure?
No. It is a novelty. Anyone who knows the command can delete it, and the contents are not protected. Use permissions or encryption for real needs.
Comments
Post a Comment
If you have anything in mind, please let me know!