Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to attrib?
Message
 
 
À
19/05/2003 03:34:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00789898
Message ID:
00790220
Vues:
23
>hi all!
>
>is there an alternative command for the attrib-command in dos?
>
>if possible i'd like to get rid of the run /n ...-command in fox but i do need this attrib-command.
>
>other ways i don't want to use:
>
  • x=createobject("wscript.shell")
    >x.run("attrib ...")

  • >
  • using ShellExecute

>
>thanks!

One way is to use the FileSystemObject in Scrrun.dll:

*----------------------------------------
LOCAL loFS AS Scripting.FileSystemObject
LOCAL loFile
m.loFS = NEWOBJECT( "Scripting.FileSystemObject" )
m.loFile = m.loFS.GetFile( "filename" )
? m.loFile.Attributes
* Then the code to change the attribute.
- Andy Rice
San Diego, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform