Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro Equivilant of ATTRIB command?
Message
De
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:
00688051
Vues:
20
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform