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

Chapter 16. Understanding Batch Files > Moving Parameters with SHIFT

Moving Parameters with SHIFT

The SHIFT command moves the parameters in the command line that invoked the batch file; each parameter moves one parameter to the left. SHIFT tricks DOS into accepting more than 9 replaceable parameters (10 if you include the batch filename, which is %0). The diagram of SHIFT is as follows:

%0  ←%1  ←%2  ←%3  ←%4  ←%5...
↓
bit bucket


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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