In DOS batch files, you can create and use variables. The variables are expressed using the percentage symbol followed by a number. For example, look at the following batch file, which I will call test.bat:
This is a very simple batch file, but here is how you can use. At the prompt, type (I'm assuming you are working in the folder C: \ DOSTEMP \ working directory):
If you have done correctly, you should see a complete directory listing in the root directory of C: What is the batch file to take the command DIR and its application to any specified directory. If you neglect to specify a directory, you will get a listing of the current working directory (C: \ DOSTEMP \), as if he had given a DIR command, without specifying the destination directory. If you specify a directory on the command line, which is the directory variable 1, or 1%. Now, I suppose, that had issued the command:
c:\dostemp\>test.bat c:\ c:\windows\
If you try this, you will see that you still get the list of the root directory of C:, but only that. After all, your batch file is looking for a variable, and the DIR command can have only one directory.