Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do ADIR() and ASORT() using WSH
Message
De
31/08/2000 13:50:59
 
 
À
31/08/2000 13:09:23
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00411372
Message ID:
00411387
Vues:
15
>Hi all,
>
>Can anybody tell me how to do ADIR() and ASORT() using WSH ?

ADIR() retrieves files matching a mask in a folder, so the equivalent would be to use GetFolder() in the Scripting.FileSystemObject and iterate through the Files and/or FOlders collection of the folder object it returns.

There is no equivalent of ASORT(); ASORT() sorts an array, and has nothing to do with file or folder manipulation. You could pull the Files or Folders collection into a Scripting.Dictionary object, which performs a lexical sort of the items entered into it.

I suggest that you pick up a copy of "Windows Script Host Programmer's Reference" by Dino Esposito (WROX Press) as a general guide to the WSH. You may want to pick up a guide to VBScript or JScript as well, since any scripts need to be written in a supported scripting language.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform