Number 220 - September 2001
CD-ROM Read Only Attribute
by Lou Eckhoff, Tacoma Open Group for Microcomputers
    [Recently I bought a new laptop computer and wanted to transfer several old familiar programs to it from my old computer. The new computer did not have a 5 1/4 inch disk drive (remember them?) so I could not load the programs from the original disks. However, both computers had a compact disk drive.]

    A CD-ROM with its 600 megabite capacity sounds like a great way to transfer files from one computer to another. But if you do so, you may find that when the files are transferred to the receiving computer the Read Only attribute has been set. [That's what happened to me when I tried to copy those old DOS-based programs and their data files from my old computer to the new one, using a CD-ROM as the transfer medium. With data files set to R/O status I could not update them.] Windows sees the CD-ROM as a read-only device and sets the attribute [to R/O] when the files are transferred to [the CD-ROM]. The R/O attribute is retained when they are copied to the] hard disk. The files can be set to Read-Write status through Windows Explorer by going to the file properties. This can be tedious if you have transferred many files as it is a one-at-a-time process.

    DOS to the rescue! The ATTRIB command in DOS accepts wild cards, and can be used to change the attributes of many files with one command line entry. Here's how:
    Get to the DOS command prompt. Go to Start, Run and type command if you don't have a shortcut to DOS. [At the DOS prompt, C:\>,] change to the directory where you have stored the files.

    To see the file attributes that have been set to read only type:
    ATTRIB *.*.

    To change all of the files in the directory and its sub directories type:
    ATTRIB -r *.* /s

Editor's Notes:
    In case you don't recall1 [or never knew] these command "switches", let us help you recall their meanings:
    ATTRIB +R filename.ext means set the file filename.ext to Read Only
    ATTRIB -R filename.ext means set the file filename.ext to Read Write
    /s processes (i.e. applies the command to) files in all subdirectories of the specified path

    In this case ATTRIB -r *.* /s sets ALL files in the directory and any subdirectories to Read Write status.

    1 We had to look them up in our old MS-DOS manual!
  Number 220 - September 2001