>I use this to make it readonly using WSH:
>
>IF FILE("C:\scanned2903.tif") THEN
> oFSO = CREATEOBJECT("Scripting.FileSystemObject")
> oFile = oFSO.GetFile("C:\scanned2903.tif")
> * Set the read-only bit.
> oFile.Attributes = BITOR(oFile.Attributes, 1)
>ENDIF
>######################################
>I use BITOR to make it read only.
>I don't know how to reverse the BITOR.
>
>Thank you..
As Hilmar said, BitXOR will toogle the attribute. You can use
oFile.Attributes = oFile.Attributes - BitAnd(oFile.Attributes, 1)
to unset it regardless of its state
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges