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

Chapter 16. Understanding Batch Files > Understanding Replaceable Parameters

Understanding Replaceable Parameters

The batch files discussed so far in this chapter carry out exactly the same functions every time you use them. You might want a particular batch file to operate on different files each time you use it, even though the commands in the batch file are fixed. When you use replaceable parameters in a batch file, you can use the same commands to perform different tasks.

You already know that a parameter is an additional instruction that defines the task a DOS command will perform. When you type the name of the batch file at the DOS prompt, you can include up to nine parameters. DOS assigns a variable name to each parameter, starting with 1 and going up to 9. (DOS always assigns the variable name 0 to the name of the batch file itself.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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