Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting File Attributes
Message
 
 
To
11/10/2001 09:57:45
Paulo Pechula
Folhamatic Sistemas
Americana, Brazil
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00566927
Message ID:
00566931
Views:
14
>Hi everyone.
>
>I'd like to know if is there any API function that sets a file attribute (Hidden, Read Only, System...).
>I'm using the "!" command at the moment (and I don't like the results.. ;) My screen blinks every time whem I run this command).
>
>Thanks for any help...
>
>Regards...
>
>Paulo.

You don't have to use DOS command to do that. Download file#9311 'File Attribute Get & Set' or 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)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform