Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing attribute on a file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00946210
Message ID:
00946212
Views:
22
>Hallo
>I have searched through the whole helpsystem in VFP7, but I cant find what Im looking for:
>How do I change the attribute from "read/write" to "read-only" to a file on the disc whith a command in VFP?

Hi,
You can RUN attrib && as described in Windows help
or use the APIs Get/SetFileAttributes
#define ATTRIBUTE_READONLY 1
#define ATTRIBUTE_HIDDEN 2
#define ATTRIBUTE_SYSTEM 4
#define ATTRIBUTE_DIRECTORY 16
#define ATTRIBUTE_ARCHIVE 32
#define ATTRIBUTE_NORMAL 128

Declare Integer GetFileAttributes in Win32Api String cFilename
Declare SetFileAttributes in Win32Api String cFilename, Integer nAttributes
hth
-Stefan
Previous
Reply
Map
View

Click here to load this message in the networking platform