Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Scripting object
Message
De
14/12/2000 19:21:24
 
 
À
14/12/2000 12:48:09
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00453480
Message ID:
00453702
Vues:
31
>I'm tring to convert this code from vbs to vfp. It simply list a list of files in a certain directory. I get the following error "'Files' is not a varible".
>
>
>Here is the code:
>
>fso = CreateObject("Scripting.FileSystemObject")
>f = fso.GetFolder("c:\test")
>fc = f.Files
>For Each f1 in fc
> s = s + f1.name
> s = s + "
"
>Next
>? s

Try:
fso = CreateObject("scripting.FileSystemObject")
f = fso.GetFolder("c:\test")
s = ''
FOR EACH f1 IN f.Files
  s = s + f1.name + '<BR>'
NEXT
? s
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform