Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change the folder attribute to RO
Message
De
04/02/2004 11:10:38
 
 
À
03/02/2004 17:01:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00873653
Message ID:
00873951
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform