Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Size of Directory
Message
De
10/08/2002 10:25:04
 
 
À
10/08/2002 09:49:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00688118
Message ID:
00688298
Vues:
19
>I am having problems using the GetFolder method. When I create an Instance using GetFolder an try to get the name of the SubFolders using the function Item() I get the error: 'Incorrect Number of Parameters'. I read the MSDN and the function dont have any parameters. Did you have this problem too ?
>

Try:
oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFolder=oFSO.GetFolder('C:\MyTopFolder')
IF oFolder.SubFolders.Count > 0
   FOR EACH oSubFolder IN oFolder.SubFolders
      WITH oSubFolder
         ? .Name,.Path,.Files.Count,.SubFolders.Count  && each oSubFolder is a Folder Object
      ENDWITH
   ENDFOR
ELSE
   ? 'There are no subfolders!'
ENDIF
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