>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.