Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File attributes
Message
 
 
À
04/10/1996 09:49:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00009375
Message ID:
00009381
Vues:
33
>I want to change WordPerfect file attributes (make them read only) programmatically with VFP. Is there some tricks or API function I can use.

hi again this is the get for the previous set. I tried to send them together but it was too long for UT. I think :)

Joe Johnston


*********************************************************
FUNCTION GetAttr
PARAMETER zFileName && This is a complete filespec.

Private zADIR, zReturn, zAReturn, zAttribute, zForNext, zAt

zAReturn = ADIR(zADIR, zFileName,'rhsa')
zReturn = ''

IF zAReturn = 1 && check for bad filename
zAttribute = zADIR[5] && get our attributes

FOR zForNext = 1 to 5 && Loop through attribs

zAt = SUBSTR(zAttribute,zForNext,1) && pull out 1 char

IF zAt != '.' && skip 'blanks'
zReturn = (zReturn + zAt) && set the return up
ENDIF

ENDFOR
ELSE
zReturn = '?' && Indicate a bad filename
ENDIF

RETURN (zReturn)
*** EOP ***
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform