Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing file attributes thru VFP or API?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00108427
Message ID:
00108522
Views:
35
>I am finding shelling out to DOS in my VFP application (under WinNT) to change file attributes from ReadOnly to ReadWrite to be a drag! I don't want to have a DOS window pop up on the screen, and when I use RUN /N2, the command doesn't always finish by the time I need to delete the file in code (yech). There must be some programmatic method to do this:
>
>If ReadOnly
> Make ReadWrite
>EndIf
>
>Even if I have to resort to an API!?!?
>
>TIA

Michael,

There is an API call SetFileAttribute which you pass it the file name and a DWORD value containing the combined attributes. See Win32API help file for further info.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform