Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change File Attribute
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577543
Message ID:
00577544
Vues:
13
>Is there a way to change a file attribute? The file may not be assciated with VFP. For example the file is read only and I want a program to go out and change it to read/write.

You can use WSH
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
oFile = oFSO.GetFile(lcfile) && lcfile is the name of the file
* Turn off the read-only bit
oFile.Attributes = BITAND(oFile.Attributes, 0xFE)
You can use file#9311 or win api#12727.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform