Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change the read-only setup of a file by code ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00423846
Message ID:
00424124
Views:
21
>>#DEFINE READONLY 1
>>oFSO = CREATEOBJECT('Scripting.FileSystemObject')
>>* lcfile is the fully qualified file name of an existing file
>>oFile = oFSO.GetFile(lcfile)
>>oFile.Attributes = BITXOR(oFile.Attributes, READONLY)
>
>
>Hey George. I inadvertently saw your post and tried it.
>Cool!!
>It will come in handy. :)
>
>Thanks.

Andy,

There's more where that came from. If you haven't been following the series on the Windows Script Host that Ed Rauh and I are writing, go to www.vfug.org. The first two (of five) articles are available there (the Introduction and the WScript.Shell object). As soon as we wrap up number 3 (which should be within the next week), that'll be in the November issue, which is currently "Under Construction". The third article is on the Scripting.FileSystemObject. The fourth will be on the WScript.Network. Currently, number five is slated to be on the regular expression parser and perhaps a bit of a wrap up.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform