Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File attributes
Message
From
04/10/1996 10:15:36
 
 
To
04/10/1996 09:49:21
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00009375
Message ID:
00009381
Views:
35
>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

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform