| • | Using the shift command-line option with command extensions When command extensions are enabled (that is, the default), the shift command supports the /n command-line option, which tells the command to start shifting at the nth argument, where n can be a value from zero to eight. For example, SHIFT /2 would shift %3 to %2, %4 to %3, and so on, and leave %0 and %1 unaffected. |
| • | How the shift command works The shift command changes the values of the batch parameters %0 through %9 by copying each parameter into the previous one. In other words, the value of %1 is copied to %0, the value of %2 is copied to %1, and so on. This is useful for writing a batch file that performs the same operation on any number of parameters. |