If you have an important document that you want to protect from overwriting, changing the file attribute to read-only can be an effective solution. A read-only file will give you an alert message whenever you attempt to write something in it. In this tutorial, we will show you how to make a file read-only by following some straightforward steps.
Firstly, open the file explorer window and go to the saved location of your file. Then, right-click on the file name that you want to make read-only. From the drop-down list, click on the properties option at the bottom. In the general tab, under the attributes section, select the checkbox of read-only. Finally, click on the apply button and then on the ok button. This will make your file read-only.
To cross-check your file, right-click on the file name and click on the properties option again. You will see that the check of read-only is checked, which means you cannot overwrite this file.
Another method to make a read-only file is by using the command prompt. Click on the windows search bar at the bottom left and type “cmd” in the search bar. From the search results, click on the command prompt app. Type “attrib +r “open quote” and write the path of your file. For example, “c:userscapturedesktopphotos.pdf” close quote. Press the enter key on your keyboard.
To check the attributes of your file, right-click on it and then click on the properties option. You will see that we have made this file read-only by using the command prompt.
Making a file read-only is an effective way to protect important documents from accidental changes. It is easy to do, and you can use either the file explorer window or the command prompt to achieve it. Now that you know how to make a file read-only, you can secure your documents with ease.