Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 124 Posts 7 Joined 2002-12-09 00:00 23-year member UID 448 Gender Male
Status Offline
Let me talk about the usage of %1 %2.
% represents a parameter. A parameter refers to the string added after the file name when running a batch file. Variables can range from %0 to %9. %0 represents the file name itself, and strings are represented in order from %1 to %9.
For example: There is a batch file named t.bat under the C: root directory. The content is type %1 type %2
Then running c:\t a.txt b.txt will sequentially display the contents of the a.txt and b.txt files.