• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Scripting and Automation > Using Command-Line Parameters in Scripts

9.8. Using Command-Line Parameters in Scripts

A command-line parameter is a bit of text specified after the filename of a script when it is executed from a command prompt (see the following examples). The function used to convert a single command-line parameter into a variable is the following:

Function CommandLine(Number)
  Set Arguments = WScript.Arguments
  If Number <= Arguments.Count Then 
    CommandLine = Arguments(Number - 1)
  Else
    CommandLine = ""
  End If
End Function


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint