Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read only file
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00529877
Message ID:
00529919
Views:
8
>Hi,
>
>easy one to answer: how can I set the read only property of a file (a .INI file) using Windows API? Or is there a VFP command or foundation class that does this?
>
>TIA
>
Alonso,

There also the Windows Script Host's Scripting.FileSystem object. You'd do
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
* Get an object reference to the file of interest
oFile = oFSO.GetFile(lcfile)
* Set to Read-Only
oFile.Attributes = BITOR(oFile.Attributes, 1)
George

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

Click here to load this message in the networking platform