Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change File Attribute
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00577543
Message ID:
00577544
Views:
12
>Is there a way to change a file attribute? The file may not be assciated with VFP. For example the file is read only and I want a program to go out and change it to read/write.

You can use WSH
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
oFile = oFSO.GetFile(lcfile) && lcfile is the name of the file
* Turn off the read-only bit
oFile.Attributes = BITAND(oFile.Attributes, 0xFE)
You can use file#9311 or win api#12727.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform