Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing attribute on a file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00946210
Message ID:
00946212
Vues:
23
>Hallo
>I have searched through the whole helpsystem in VFP7, but I cant find what Im looking for:
>How do I change the attribute from "read/write" to "read-only" to a file on the disc whith a command in VFP?

Hi,
You can RUN attrib && as described in Windows help
or use the APIs Get/SetFileAttributes
#define ATTRIBUTE_READONLY 1
#define ATTRIBUTE_HIDDEN 2
#define ATTRIBUTE_SYSTEM 4
#define ATTRIBUTE_DIRECTORY 16
#define ATTRIBUTE_ARCHIVE 32
#define ATTRIBUTE_NORMAL 128

Declare Integer GetFileAttributes in Win32Api String cFilename
Declare SetFileAttributes in Win32Api String cFilename, Integer nAttributes
hth
-Stefan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform