Set args = Wscript.Arguments
For Each arg In args
Wscript.Echo arg
Next
From a command prompt, run the script like this:
CSCRIPT MyScript.vbs 1 2 A B "Arg with spaces"
Will give results like this:
1
2
A
B
Arg with spaces
More Related Contents:
- Running command line silently with VbScript and getting output?
- Is it possible to accept custom command line parameters with Inno Setup
- How do I access command line arguments?
- How can I read command line parameters from an R script?
- What’s the best way to parse command line arguments? [closed]
- How to pass command line arguments to a rake task
- What does cmd /C mean? [closed]
- How to loop through files matching wildcard in batch file
- How do I use the lines of a file as arguments of a command?
- Encoding a readable movie by QuickTime using FFMPEG
- How to use command line arguments in Fortran?
- How do I install cygwin components from the command line?
- How to animate the command line?
- xcopy file, rename, suppress “Does xxx specify a file name…” message
- How can I show lines in common (reverse diff)?
- PowerShell – Start-Process and Cmdline Switches
- Command prompt won’t change directory to another drive
- How to pass argument to Makefile from command line?
- When I run the .jar, I get a “No lwjgl in java.library.path” error
- String replacement in batch file
- How to script FTP upload and download
- Is there a command line utility for rendering GitHub flavored Markdown?
- wmic error (invalid XSL format) in windows7
- Java: Check if command line arguments are null
- Is there a “standard” format for command line/shell help text?
- SAS Display Manager commands
- How do I parse command line arguments in Scala? [closed]
- How can I process command line arguments in Python? [duplicate]
- How can I read and process (parse) command line arguments?
- find filenames NOT ending in specific extensions on Unix?