How to Remove Read-Only From All Files in a Folder

May 27, 2020
Est. Reading: 1 min

Here’s how to deal with files copied from a disc to a computer that suddenly end up as “read-only”.

After copying a batch of files to your Windows PC from a CD or DVD, you may discover that all the copied files carry the read-only flag. The most obvious way to remove the read-only flag from a file is to right-click on its icon, choose “Properties”, and uncheck the “Read-only” box. But what if you have hundreds, or even thousands of files marked read-only?

Batch-Remove the Read-Only Flag

You can batch-remove the read-only flag from multiple files using the attrib command from a command prompt. The Windows Command Line site has a tutorial on commands everyone can use, which includes an explanation of performing this task with the attrib command. The section on the attrib command is titled “Changing file attributes with ‘attrib’”, and is located about three quarters of the way down the page.

In short, you can remove the read-only flag from a group of files by navigating to their folder from a command prompt and typing attrib -r ./*.* /s. I did this to a folder full of image files with attrib -r ./*.jpg /s.

Bring up a command prompt in Windows 7 & 10 by clicking Start → Run, typing “cmd”, and pressing “OK”. In Windows XP & Vista, click Start, type “cmd”, and press the Enter key.

Leave a Reply

Your email address will not be published. Required fields are marked *