Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro Equivilant of ATTRIB command?
Message
 
To
09/08/2002 12:03:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00688042
Message ID:
00688085
Views:
20
Perfect! Thanks!

>>Is there anyway to change the attributes of a file in VFP6? Either a built in command/control, or a third party VCX would work fine...
>>
>>Thanks
>
>
>declare integer SetFileAttributes in Win32API ;
>	string @ lpFileName,  integer dwFileAttributes
>declare integer GetFileAttributes in Win32API ;
>  string @ lpFileName
>
>function ChangeAttrib
>Lparameters tcFileName, tlReadOnly, tlHidden, tlSystem
>#Define FILE_ATTRIBUTE_READONLY             0x00000001
>#Define FILE_ATTRIBUTE_HIDDEN               0x00000002
>#Define FILE_ATTRIBUTE_SYSTEM               0x00000004
>Local lnNewAttr
>lnNewAttr = iif(tlReadOnly,FILE_ATTRIBUTE_READONLY,0)+;
>	iif(tlHidden,FILE_ATTRIBUTE_HIDDEN,0)+;
>	iif(tlSystem,FILE_ATTRIBUTE_SYSTEM,0)
>Return ( SetFileAttributes(@tcFileName, ;
>	bitor(bitand(GetFileAttributes(@tcFileName),0xFFFFFFF8),lnNewAttr)) = 1 )
>
Cetin
Scott
Previous
Reply
Map
View

Click here to load this message in the networking platform