Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Scripting object
Message
 
 
À
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:
00453495
Vues:
46
>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

Change your variable names to something other than single characters. Unlike VB Script (the example from MSDN you are using), VFP uses the first several letters of the alphabet to designate workareas. It is looking for a workarea with a field name of Files and it can't find one.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform