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

  1. Right click on the file, you want to make it Read-only.
  2. Click on the Properties tab from the context menu.
  3. Click the Read-only check box belong to Attributes from on the General tab from the popped up Properties window.
  4. Click on Apply and then click on Okay.

Command Prompt Method

  1. 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.
  2. 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

You may like