oFSO = CREATEOBJECT("Scripting.FileSystemObject") oFile = oFSO.GetFile(lcfile) && lcfile is the name of the file * Turn on the read-only bit oFile.Attributes = BITOR(oFile.Attributes, 0x01) * Turn off the read-only bit oFile.Attributes = BITAND(oFile.Attributes, 0xFE)You can also use File Attribute Get & Set File #9311 or SetFileAttributes API #12727.