Skip to main content

How to Create an Undeletable Folder in Windows (and Remove One)

Managing folders on Windows

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

  1. Open Command Prompt.
  2. Navigate to where you want it (e.g. cd C:\Users\YourName\Desktop).
  3. 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

NoteDetail
Remove only via CMDrd NAME\ with the reserved name
Not real protectionAnyone who knows the trick can delete it
Do not put vital files in itYou 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

Popular posts from this blog

How to Completely Uninstall Programs on Windows (Free Tools and Tips)

Short answer: you do not need a cracked Revo Uninstaller Pro, because Revo has a capable free version and there are free open-source alternatives that remove programs completely, leftover files and registry entries included. Here is how to uninstall cleanly and why leftovers matter. Why leftovers are a problem Windows' built-in uninstaller often leaves behind folders, registry keys and startup entries. Over time these accumulate, clutter your system, and occasionally cause conflicts when you reinstall software. A dedicated uninstaller sweeps them up. Free tools that remove programs completely Revo Uninstaller Free , uninstalls the program, then scans for and removes leftover files and registry entries. The free version covers what most people need. Bulk Crap Uninstaller , free, open source, and excellent for removing many programs at once and cleaning leftovers. How to uninstall cleanly with Revo Free Open Revo and select the program. Click Uninstall; let the progra...

How to Recover Deleted Files for Free (Better Than a Cracked Tool)

Short answer: you do not need a cracked 7-Data Recovery serial, because excellent free tools like Recuva and PhotoRec recover deleted files, and the most important factor is not the software at all, it is stopping use of the drive immediately. Here is how to recover files the safe, effective way. The one rule that decides success: stop using the drive When you delete a file, the data is not erased, the space is just marked reusable. The moment you keep saving new files, you risk overwriting the deleted data permanently. So the instant you realize something is gone: stop using that drive . Do not install recovery software onto it either, download it to a different drive or USB stick. The best free recovery tools Recuva , free, friendly, great for recovering deleted documents, photos and files from Windows drives and USB sticks. PhotoRec , free and open source, extremely powerful, especially for photos and media, though its interface is basic. Windows File History / backups , ...

How to Transfer Contacts Between Phones the Easy Way (2026)

Short answer: The easiest way to move contacts is to sync them to a cloud account first. Save contacts to your Google account on Android or iCloud on iPhone, then sign in to that same account on the new phone and they appear automatically. For everything else, export a vCard (.vcf) file and import it. Every time I set up a new phone the very first thing I want back is my contacts. Years ago this meant fiddly SIM copies and desktop software. These days I almost never touch a cable. Here are the modern methods I actually use, ranked from easiest to most manual. Method 1: Google account sync (best for Android) If your contacts are saved to your Google account rather than the phone itself, switching Android phones is basically automatic. On the old phone, open Settings > Accounts > Google and confirm Contacts sync is on. Wait a minute for the sync to finish, or tap the three-dot menu and choose Sync now . On the new phone, sign in with the same Google account during setup....