In Microsoft Windows 7 you can make any file of your choice to become undeletable or non deletable, so that, the user himself or self does not accidentally delete it.
You can add the attribute to the file by right click over it, going to properties and checking the right boxes. However, we are showing you more powerful way: making any file undeletable by using command prompt.
Click start, type “cmd” (without the quotation marks) in the search field; command promp icon will appear on the top of the start menu list, right click over it and select “Run as administrator”. Accept any security prompt:
Now, in the command prompt, type
Followed by any one or combination of these codes; all three can be used together:
+s : This variable makes the “Attribute” of a file into a system file
+h : This variable makes the “Attribute” of a file hidden
+a : This variable makes the “Attribute” of a file archived
followed by the filepath and file name separated by a backslash.
So the whole command looks like:
attrib +s +h +a filepathfilename
Simply hit enter and you are done.
Follow the Author of this article :