oFSO = CREATEOBJECT("Scripting.FileSystemObject") oFile = oFSO.GetFile(lcfile) && lcfile is the name of the file * Toggle the read-only bit oFile.Attributes = BITXOR(oFile.Attributes, 1)In the above example, if the attribute is not Read-Only the Read-Only bit will be set. Otherwise, it will be cleared.