Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro Equivilant of ATTRIB command?
Message
 
À
09/08/2002 12:03:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00688042
Message ID:
00688085
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform