Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding command line arguments/parameters 1

Status
Not open for further replies.

JackBoughson

IS-IT--Management
Sep 17, 2001
2
US
Ladies and Gentlemen,

When executing a .VBS file via CSCRIPT.EXE and passing it arguments/parameters, to be tested in the script, how do you access the command line parameters?

I've looked over several books that I have, and searched the web. But to no avail.

I assume it's available via a "command" (VB6) like function, or through a collection of some sort (but I don't know what library/dll).

Any help would be greatly appreciated.

Thanks!
 
Code:
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
   WScript.Echo objArgs(I)
Next

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top