How to make a file read-only

Author: Eric Farmer
Date Of Creation: 3 March 2021
Update Date: 1 July 2024
Anonim
How to make a file read only in Windows10
Video: How to make a file read only in Windows10

Content

You create a file and put important information in it, you do not want to accidentally delete it and for security purposes it would be nice to see an additional warning before deleting (or any other action). An easy and effective way to do this is to change the file attributes to Read Only. If you are unsure how to do this, read the tips below.

Steps

Method 1 of 2: The GUI Method

  1. 1 Right click on the file whose attributes you want to change to Only reading.
  2. 2 In the context menu, select the tab Properties.
  3. 3 In the Properties window that appears, select the Read Only check box under Attributes on the General tab.
  4. 4 Click on Apply and then - OK.

Method 2 of 2: Command Line Method

  1. 1 Open up Command line. It can be opened by clicking on Start-> Runand then enter cmd and press Enter... You can also press the keyboard shortcut Win + R.
  2. 2 To make the file read-only, enter the following commands.
    • attrib + r "file path =" ">" / file>
    • Example: attrib + r "D: wikiHow.txt"

Tips

  • Changing the file attributes to Read Only can help you in many cases.
    • When you try to change the filename, a warning appears.
    • When you try to delete a file, a warning appears.
  • To remove an attribute Only reading from file:
    • for the GUI method, just uncheck the box Only reading;
    • for command line method, change in command + r on the -r.
      For example: attrib -r "D: wikiHow.txt"