Make a File Read Only
You create a file and put some important things in it; you don't want to lose it by deleting it mistakenly, and for safety reasons want a warning message before deletion (or for any other reason). Making a file Read-only is an easy and efficient way to proceed. If you don't know how to do this, see step 1 below to begin.
Steps
GUI Method
- Right click on the file, you want to make it Read-only.
- Click on the Properties tab from the context menu.
- Click the Read-only check box belong to Attributes from on the General tab from the popped up Properties window.
- Click on Apply and then click on Okay.
Command Prompt Method
- Open command prompt. You can open it by clicking on Start->Run, then type cmd and hit Enter. You can also press Win Key+R.
- Write below codes and hit Enter to make your file Read-only.
-
attrib +r "<file path="">"</file>
- Example:
attrib +r "D:\wikiHow.txt"
-
Tips
- Making a file Read-only helps you in many ways.
- It prompts when you try to change that file name.
- It prompts when you try to delete it.
- To remove Read-only from a file
- In GUI method, just deselect that Read-only check box.
- In command prompt method, write that code with -r instead of +r.
Example:attrib -r "D:\wikiHow.txt"
Related Articles
- Write a Batch File
- Permanently Remove Files from Your Hard Drive
- Encode a Computer File Into a Base64 Encoded Text File
- Identify Unknown Files in Your Computer