Microsoft DOS SCANDISKSETSETVERSETVER.EXESHARESHELL Draft for Information Only
ContentMS DOS Command: SHIFT
MS DOS Command: SHIFTReference from Microsoft MS-DOS cmd help DescriptionChanges the position of replaceable parameters in a batch program. SyntaxSHIFT
RemarksHow the SHIFT command worksThe SHIFT command changes the values of the replaceable 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. Working with more than 10 command-line parametersYou can also use the SHIFT command to create a batch file that can accept more than 10 parameters. If you specify more than 10 parameters on the command line, those that appear after the tenth (%9) will be shifted one at a time into %9. Shifting parameters backThere is no backward SHIFT command. Once you carry out the SHIFT command, you cannot recover the first parameter (%0) that existed before the shift. ExamplesThe following batch file, MYCOPY.BAT, shows how to use the SHIFT command with any number of parameters. It copies a list of files to a specific directory. The parameters are the directory name followed by any number of filenames.
©sideway ID: 110700258 Last Updated: 7/30/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019