Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a file Read-Only
Message
From
26/01/2000 12:12:59
 
 
To
26/01/2000 09:37:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322772
Message ID:
00322930
Views:
17
>Hi!
>
>Anyone knows if it is possible to set a file's Read-Only attribute in VFP6 SP3?
>


You can call the API as shown in the FAQ, or using Scripting.FileSystemObject to grab a file object and set the attribute:

oFSO=CREATEOBJ('Scripting.FileSystem')
oFile = oFSO.GetFile('C:\MyFile\That I want to set\as.read.only')
#DEFINE READONLY 1
oFile.Attributes = BITOR(oFile.Attributes,READONLY)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform