Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use Item collection in WSH files object
Message
De
26/07/2002 11:55:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
How to use Item collection in WSH files object
Divers
Thread ID:
00683037
Message ID:
00683037
Vues:
54
Using the Scripting.FileSystemObject

I can get a reference to the files collection for a folder

And reference it as follows

FOR EACH file IN fold.files
? file.name
next


Since I often only want the first file found is there anyway I can avoid using "FOR EACH"

I had expected to get a reference as follows

myob= fold.Files.Item(1).name

but this does not work. I get the error "Member Item does not evaluate to an object"

What am I doing wrong:(
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform