Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change the folder attribute to RO
Message
From
04/02/2004 11:10:38
 
 
To
03/02/2004 17:01:57
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00873653
Message ID:
00873951
Views:
14
I think it might be easier changing the attributes of the files in a folder. The code below does this for C:\test folder.
DECLARE INTEGER SetFileAttributes IN kernel32.dll;
   STRING @ lpFileName,;
   INTEGER dwFileAttributes
   
#DEFINE FILE_ATTRIBUTE_NORMAL    0x0080
#DEFINE FILE_ATTRIBUTE_READONLY  0x0001

SET DEFAULT TO C:\test
lnNumFiles = ADIR(FileList,'*.*')

FOR t = 1 TO lnNumFiles
   =SetFileAttributes(FileList[t,1], FILE_ATTRIBUTE_READONLY)
ENDFOR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform