-->

Pages

Wednesday 5 April 2017

Trick to create Undeletable and Unrenamable Folders in Windows!

Most of the time when we create a folder or directory in our Windows Operating System, we give it name according to our liking and requirements and these folders can easily be deleted manually and we can rename them as many times as we want.However, there exist a trick that allows us to create undeletable and unrenamable folders or directories in our Windows Operating System.

If you have ever come across any programming language such as C or Java or something else, you guys must have read about Keywords over there, these words are the reserved words that we can not use to name a variable or a function in the respective programming language cause their respective meaning has already been defined to the Compiler.The basic concept behind the creation of undeletable and unrenamable folder is the same concept of the keywords, In Windows Operating System there are certain keywords that have been used in the development of Windows OS and if you use any of such keywords while creating a folder, these folders will become undeletable and unrenamable cause you don't have the required permission of deleting or renaming them from Windows.

Some of the Keywords are con, aux, lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8 and lpt9. In order to check whether these words are keywords or not, you can do a test. Create a folder in your directory and give it some name, once the folder gets created, now try to rename it by any of the above-mentioned keywords, you won't be able to do so and you will be getting an error like, The specified device name is invalid. You can even try saving your files by any of these mentioned keywords, you won't be able to do so, you will get an error like this filename is reserved for use by Windows, Choose another name and try again.

How to create a folder by using Keyword as their name:

It's time for us to get into the trick to create a folder which can not be manually deleted or renamed, here we have to use the Command Prompt of Windows Operating System and have to use make directory command (md) from the command prompt to create undeletable and unrenamable folders.
  • First of all, open the Command Prompt on your Windows based Computer. You can open it by searching cmd or you can open it from the run dialog box, just press Windows key and r together to open the run dialog box and write cmd over there and then press enter.

  • Once the command prompt is open, now select the drive where you want to create the folder, for example, if you want to create a folder in the "D" drive, just type D: and press enter, it will get you inside the D directory.

  • Type the following 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.

Creating a folder name as con in my E-Directory


When I try to delete it manually

Now Windows will create a undeletable and unrenamable folder inside your selected directory, however, you can rename the created folder by replacing it with some other keyword, you can not rename it by using some random folder name.

If you ever feel like deleting the created folder, you can not do it manually by using the Windows Explorer, In order to delete it, you have to use the Command Prompt again and here first you have to navigate to the directory where the folder is and then you have to type "rd con\" or "rd lpt1\" or whatever the name you have given to your folder.

That's it in this article of mine, I hope you guys will find it informative, cause it is good to have some sort of security over your folders and to protect them from getting deleted by a random person, just create a folder with any of the keywords and then place important file over there as no one will be able to delete the folder directly.

No comments:

Post a Comment

Thanks for Your Time!