Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change file attribute
Message
De
16/08/2001 12:07:21
 
 
À
16/08/2001 11:36:11
Alex Zhadanov
Computer Generated Solutions
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00544743
Message ID:
00544770
Vues:
15
>Hi people.
>How can i change file attribute from read only to write and back?
>Thank you

You can do this with the FileSystemObject:
oFSO = CreateObject("Scripting.FileSystemObject")
oFile = oFSO.GetFile("d:\temp\package.txt")
To set it to read only:
oFile.Attributes = oFile.Attributes + 1
To clear the read only:
oFile.Attributes = oFile.Attributes - 1
Where 1 is the attribute value for the file's read-only flag.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform