>>>>>Hi all !
>>>>>
>>>>>Exist some command in the vfp that modify the permission of a file without using FileSystemObject ?
>>>>>
>>>>Check
How to change file attributes programmatically FAQ #15763
>>>
>>>Hello Sergey,
>>>
>>>I have used Windows Scripting Host, using FileSystemObject (oFSO) which works great until now. I got an error message "OLE error code 0x800a0035: Unknown COM status code" that occured after oFile = oFSO.GetFile(lcFile). What do you think is the problem?
>>
>>
>>The file doesn't exist.
>
>Ah, thank you very much! It does make sense, however, I find it ironic because the code is as follows:
>
>
IF file(lcFile)
> oFSO = CREATEOBJECT("Scripting.FileSystemObject")
> * Get attributes
> oFile = oFSO.GetFile(lcFile)
> * Turn off the read-only flag
> IF BITAND(oFile.Attributes, 1) = 1 THEN
> oFile.Attributes = BITXOR(oFile.Attributes, 1)
> ENDIF
> RELEASE ALL LIKE oF*
>ENDIF
>If the file doesn't exist, this wouldn't fire off...
It may if file exists on VFP path but not where FileSystemObject expects it. Change code to
IF oFSO.FileExists(lcFile)
...
--sb--