China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

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!

中国DOS联盟论坛
The time now is 2026-06-22 15:26
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Repost and Improve] Teach You Step by Step to Write Batch Scripts DigestI View 37,637 Replies 100
Original Poster Posted 2004-08-19 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline

───────────────── Moderator's Note ─────────────────
Click here to visit the latest updated version of this article
Click here to download the latest updated archive of this article (plain text format)
───────────────── Moderator's Note ─────────────────


The original author wrote with very little professional rigor; the article is simply full of errors, and long-winded besides. If it were not revised and improved, it would really mislead learners. Therefore, on the basis of the original, I revised it and corrected most of the errors (of course, new errors may inevitably have been introduced as well; I hope experts will point them out promptly when they find them).
URL: http://www.txwm.com/News/technic/200408/2004081609515074304.html

Excerpted from: Tianxia Internet Café Alliance Author: Anonymous
Revised and improved by: Climbing(xclimbing@msn.com)
Last revision date: August 19, 2004

Introduction to batch files
Files with the extension bat (under nt/2000/xp/2003 they can also be cmd) are batch files.
First of all, a batch file is a text file. Each line in this file is a DOS command (most of the time, just like the command lines we execute at the DOS prompt). You can use Edit under DOS or any text file editing tool such as Windows Notepad (notepad) to create and modify batch files.
Second, a batch file is a simple program. It can use conditional statements (if) and flow control statements (goto) to control the flow of command execution, and in batch files you can also use loop statements (for) to execute a command repeatedly. Of course, the programming ability of batch files is very limited compared with programming languages such as C, and it is also quite non-standard. The program statements in batch files are simply DOS commands one by one (including internal commands and external commands), and the capabilities of batch files mainly depend on the commands you use.
Third, every completed batch file is equivalent to a DOS external command. You can put the directory where it is located into your DOS search path (path) so that it can be run from any location. A good habit is to create a bat or batch directory on the hard disk (for example C:\BATCH), then put all the batch files you write into that directory. That way, as long as you set c:\batch in path, you can run all the batch programs you wrote from any location.
Fourth, under DOS and Win9x/Me systems, the AUTOEXEC.BAT batch file in the root directory of drive C: is an auto-run batch file. It runs automatically every time the system starts. You can put commands that need to run every time the system starts into this file, such as setting the search path, loading the mouse driver and disk cache, setting system environment variables, and so on. Below is an example of an autoexec.bat running under Windows 98:
@ECHO OFF
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\UCDOS;C:\DOSTools;C:\SYSTOOLS;C:\WINTOOLS;C:\BATCH
LH SMARTDRV.EXE /X
LH DOSKEY.COM /INSERT
LH CTMOUSE.EXE
SET TEMP=D:\TEMP
SET TMP=D:\TEMP

The role of batch files
Simply put, the role of batch files is to automatically execute multiple commands in succession.
Here, let me first talk about the simplest application: when starting the WPS software, each time you must execute (content before > indicates the DOS prompt):
C:\>cd wps
C:\WPS>spdos
C:\WPS>py
C:\WPS>wbx
C:\WPS>wps
If you have to execute all this every time before using WPS, don't you find it troublesome?
Alright, with a batch file, these troublesome operations can be simplified. First we write a runwps.bat batch file with the following contents:
@echo off
c:
cd\wps
spdos
py
wbx
wps
cd\
After that, whenever we want to enter WPS, we only need to run the batch file runwps.
Commonly used commands
echo, @, call, pause, rem (small trick: use :: instead of rem) are several of the most commonly used commands in batch files, so let's start learning from them.
echo means to display the characters after this command
echo off means that after this statement, all commands that run will not display the command line itself
@ is similar to echo off, but it is added at the very beginning of each command line, indicating that when it runs, that line's command line itself is not displayed (it only affects the current line).
call calls another batch file (if you do not use call and directly call another batch file, then after that batch file finishes executing, it will not be able to return to the current file and continue executing the subsequent commands in the current file).
pause running this statement will pause execution of the batch file and display the prompt Press any key to continue... on the screen, waiting for the user to press any key before continuing
rem means that the characters after this command are comment lines (annotations), which are not executed and are only for your own future reference (equivalent to comments in a program).
Example 1: Use edit to edit a.bat, enter the following content, save it as c:\a.bat, and after executing the batch file it can do the following: write all files in the root directory into a.txt, start UCDOS, enter WPS, and so on.
  The contents of the batch file are:         Command comments:
    @echo off           Do not display subsequent command lines or the current command line
    dir c:\*.* >a.txt       Write the list of files on drive C into a.txt
    call c:\ucdos\ucdos.bat    Call ucdos
    echo 你好            Display "你好"
    pause              Pause, wait for a keypress to continue
    rem 准备运行wps         Comment: prepare to run wps
    cd ucdos            Enter the ucdos directory
    wps               Run wps  
Parameters of batch files
Batch files can also use parameters like functions in C (equivalent to command-line parameters of DOS commands), and this requires the parameter marker “%”.
% indicates parameters. Parameters refer to strings added after the batch filename when running the batch file, separated by spaces (or Tabs). Variables can range from %0 to %9. %0 represents the batch command itself, and the other parameter strings are represented in order by %1 through %9.
Example 2: There is a batch file in the root directory of C: named f.bat, with the following contents:
@echo off
format %1

If you execute C:\>f a:
then when f.bat is executed, %1 means a:, so format %1 is equivalent to format a:, and therefore what the above command actually executes when run is format a:
Example 3: There is a batch file in the root directory of C: named t.bat, with the following contents:
@echo off
type %1
type %2
Then run C:\>t a.txt b.txt
%1 : means a.txt
%2 : means b.txt
So the above command will display the contents of files a.txt and b.txt in sequence.

Special commands
if goto choice for are relatively advanced commands in batch files. If you use these very skillfully, then you are a batch file expert.
1. if is a conditional statement, used to determine whether specified conditions are met, and then decide which different command to execute. There are three formats:
1、if "parameter" == "string" command to execute
If the parameter is equal to (not means not equal, same below) the specified string, the condition is true and the command runs; otherwise the next statement runs.
Example: if "%1"=="a" format a:
2、if exist filename command to execute
If the specified file exists, the condition is true and the command runs; otherwise the next statement runs.
For example: if exist c:\config.sys type c:\config.sys
This means that if the file c:\config.sys exists, then display its contents.
3、if errorlevel <number> command to execute
Many DOS programs return a numeric value after finishing execution to indicate the result (or status) of the program run. With the if errorlevel command you can judge the program's return value, and according to different return values decide which different command to execute (the return values must be arranged in descending order). If the return value equals the specified number, the condition is true and the command runs; otherwise the next statement runs.
For example if errorlevel 2 goto x2
2. goto when the batch file runs to this point, it jumps to the label specified by goto (a label is defined as : followed by a standard string). The goto statement is generally used together with if, to execute different command groups according to different conditions.
For example:

goto end
:end
echo this is the end
A label is defined with “:string”, and the line containing the label is not executed.
3. choice with this command, the user can input a character (for selection), so that according to the user's choice, a different errorlevel is returned, and then together with if errorlevel, different commands are run based on the user's choice.
Note: the choice command is an external command provided by DOS or Windows systems. The syntax of the choice command differs slightly in different versions; please use choice /? to see its usage.
The syntax of the choice command (this syntax is for the choice command in Windows 2003; the syntax of the choice command in other versions is mostly similar):
CHOICE
Description:
This tool allows users to select one item from a list of choices and returns the index of the selected item.
Parameter list:
/C choices Specifies the list of choices to create. The default list is "YN".
/N Hides the list of choices in the prompt. The message before the prompt
is still displayed, and the choices remain enabled.
/CS Allows case-sensitive choices. By default, this tool
is not case-sensitive.
/T timeout The number of seconds to pause before making the default choice. Acceptable values are from 0
to 9999. If 0 is specified, there will be no pause and the default choice
will be selected.
/D choice Specifies the default choice after nnnn seconds. The character must be in the set of choices
specified by the /C option; at the same time, nnnn must be specified with /T.
/M text Specifies the message to display before the prompt. If omitted, the tool only
displays the prompt.
/? Displays help information.
Notes:
The ERRORLEVEL environment variable is set to the index of the key selected from the choice set. The first listed
choice returns 1, the second choice returns 2, and so on. If the user presses a key that is not a valid choice,
the tool emits a warning beep. If the tool detects an error condition, it returns an ERRORLEVEL
value of 255. If the user presses Ctrl+Break or Ctrl+C, the tool returns an ERRORLEVEL
value of 0. When using the ERRORLEVEL parameter in a batch program, arrange the parameters in
descending order.
Examples:
CHOICE /?
CHOICE /C YNC /M "To confirm press Y, for no press N, or to cancel press C."
CHOICE /T 10 /C ync /CS /D y
CHOICE /C ab /M "For option 1 please select a, for option 2 please select b."
CHOICE /C ab /N /M "For option 1 please select a, for option 2 please select b."

If I run the command: CHOICE /C YNC /M "To confirm press Y, for no press N, or to cancel press C."
the screen will display:
To confirm press Y, for no press N, or to cancel press C. ?


Example: the contents of test.bat are as follows (note: when using if errorlevel to judge return values, they should be arranged from high to low):
@echo off
choice /C dme /M "defrag,mem,end"
if errorlevel 3 goto end
if errorlevel 2 goto mem
if errotlevel 1 goto defrag
:defrag
c:\dos\defrag
goto end
:mem
mem
goto end
:end
echo good bye
After this batch file runs, it will display “defrag,mem,end?”; the user may choose d m e, and then the if statements will judge according to the user's choice. d means execute the program section labeled defrag, m means execute the program section labeled mem, and e means execute the program section labeled end. At the end of each program section, goto end jumps the program to the label end, then the program will display good bye, and the batch file run ends.
4. for loop command: as long as the conditions are met, it will execute the same command multiple times.
Syntax:
Execute a specific command for each file in a set of files.
FOR %%variable IN (set) DO command
%%variable Specifies a replaceable single-letter parameter.
(set) Specifies one file or a set of files. Wildcards may be used.
command Specifies the command to execute for each file.
command-parameters
Specifies parameters or command-line switches for the specific command.
For example, if a batch file contains a line:
for %%c in (*.bat *.txt) do type %%c
then this command line will display the contents of all files in the current directory whose extensions are bat and txt.

Batch file examples
1. IF-EXIST
1)
First use Notepad to create a batch file test1.bat in C:\, with the following contents:
@echo off
IF EXIST \AUTOEXEC.BAT TYPE \AUTOEXEC.BAT
IF NOT EXIST \AUTOEXEC.BAT ECHO \AUTOEXEC.BAT does not exist
Then run it:
C:\>TEST1.BAT
If AUTOEXEC.BAT exists in C:\, then its contents will be displayed; if it does not exist, the batch file will tell you that the file does not exist.
2)
Next create another file test2.bat with the following contents:
@ECHO OFF
IF EXIST \%1 TYPE \%1
IF NOT EXIST \%1 ECHO \%1 does not exist
Execute:
C:\>TEST2 AUTOEXEC.BAT
The result of running this command is the same as above.
Explanation:
(1) IF EXIST is used to test whether a file exists. The format is
IF EXIST command
(2) %1 in the file test2.bat is a parameter. DOS allows 9 batch parameter values to be passed to a batch file, namely %1~%9 (%0 represents the test2 command itself). This is somewhat like the relationship between actual parameters and formal parameters in programming: %1 is the formal parameter, and AUTOEXEC.BAT is the actual parameter.
3) Going one step further, create a file named TEST3.BAT with the following contents:
@echo off
IF "%1" == "A" ECHO XIAO
IF "%2" == "B" ECHO TIAN
IF "%3" == "C" ECHO XIN
If you run:
C:\>TEST3 A B C
the screen will display:
XIAO
TIAN
XIN

If you run:
C:\>TEST3 A B
the screen will display
XIAO
TIAN
During execution of this command, DOS will assign an empty string to parameter %3.
2、IF-ERRORLEVEL
Create TEST4.BAT with the following contents:
@ECHO OFF
XCOPY C:\AUTOEXEC.BAT D:\
IF ERRORLEVEL 1 ECHO File copy failed
IF ERRORLEVEL 0 ECHO File copied successfully
Then execute the file:
C:\>TEST4
If the file is copied successfully, the screen will display “File copied successfully”; otherwise it will display “File copy failed”.
IF ERRORLEVEL is used to test the return value of the previous DOS command. Note that it is only the return value of the previous command, and the return values must be judged in descending order.
Therefore, the following batch file is wrong:
@ECHO OFF
XCOPY C:\AUTOEXEC.BAT D:\
IF ERRORLEVEL 0 ECHO File copied successfully
IF ERRORLEVEL 1 ECHO Source file not found
IF ERRORLEVEL 2 ECHO The user aborted the copy operation with ctrl-c
IF ERRORLEVEL 3 ECHO A preset error prevented the file copy operation
IF ERRORLEVEL 4 ECHO Disk write error during copy
Whether the copy succeeds or not, the following:
Source file not found
The user aborted the copy operation with ctrl-c
A preset error prevented the file copy operation
Disk write error during copy
will all be displayed.
Below are the return values of several commonly used commands and what they mean:
backup
0 Backup successful
1 Backup file not found
2 File sharing conflict prevented backup from completing
3 User aborted backup with ctrl-c
4 Backup operation aborted due to a fatal error
diskcomp
0 Disks are identical
1 Disks are different
2 User aborted comparison with ctrl-c
3 Comparison operation aborted due to a fatal error
4 Preset error aborted comparison
diskcopy
0 Disk copy operation successful
1 Non-fatal disk read/write error
2 User ended copy operation with ctrl-c
3 Disk copy aborted due to a fatal processing error
4 Preset error prevented copy operation
format
0 Format successful
3 User aborted formatting with ctrl-c
4 Formatting aborted due to a fatal processing error
5 At the prompt “proceed with format(y/n)?” the user entered n to end
xcopy
0 File copied successfully
1 Source file not found
2 User aborted copy operation with ctrl-c
4 Preset error prevented file copy operation
5 Disk write error during copy
3、IF STRING1 == STRING2
Create TEST5.BAT, with the following contents:
@echo off
IF "%1" == "A" FORMAT A:
Execute:
C:\>TEST5 A
The screen will then show the prompt asking whether to format drive A:.
Note: to prevent the parameter from being empty, the string is generally enclosed in double quotation marks (or other symbols; note that reserved symbols cannot be used).
For example: if == or if %1*==A*
5、GOTO
Create TEST6.BAT, with the following contents:
@ECHO OFF
IF EXIST C:\AUTOEXEC.BAT GOTO _COPY
GOTO _DONE
:_COPY
COPY C:\AUTOEXEC.BAT D:\
:_DONE
Notes:
(1) Before the label is the ASCII colon character ":"; there must be no spaces between the colon and the label.
(2) The naming rules for labels are the same as the naming rules for filenames.
(3) DOS supports labels up to eight characters long. When it cannot distinguish between two labels, it will jump to the nearest one.


6、FOR
Create C:\TEST7.BAT, with the following contents:
@ECHO OFF
FOR %%C IN (*.BAT *.TXT *.SYS) DO TYPE %%C
Run:
C:\>TEST7
After execution, the screen will display the contents of all files in the root directory of drive C: whose extensions are BAT, TXT, and SYS (excluding hidden files).
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 2 Posted 2004-08-20 00:00 ·  中国 广东 东莞 电信
初级用户
DOS新人类
Credits 178
Posts 24
Joined 2004-07-30 00:00
21-year member
UID 29274
Gender Male
From 四川
Status Offline
Great~ This is simply wonderful for a beginner like me~ Thank you~~
半年后誓必成为DOS高手!QQ317823

Floor 3 Posted 2004-08-20 00:00 ·  中国 辽宁 抚顺 联通
银牌会员
★★★
Credits 1,186
Posts 510
Joined 2004-07-30 00:00
21-year member
UID 29279
Gender Male
Status Offline
Thanks, expert!
Floor 4 Posted 2004-08-25 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 14
Joined 2004-08-25 00:00
21-year member
UID 30723
Gender Male
Status Offline
Thanks. I'm not very familiar with batch files, and I really need to learn this stuff.
Floor 5 Posted 2004-09-21 00:00 ·  中国 山西 运城 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
A hand-holding guide to writing batch files (annotated edition by willsort)
Brother Climbing can truly be said to have taken great pains over this. Moved by his effort, I have contributed a small amount of my meager strength; not a single word of the original text has been changed, and I have only added annotations under each paragraph. Most of these are not corrections, but rather reflections accumulated over the years, some sudden insights, some gradual understanding, and they may well be biased. Also, lately trivial affairs have grown more numerous, leisure has grown scarcer, and I was impatient and irritable, finishing it in one go. If the reasoning is mistaken, I respectfully ask for correction; if the wording is inappropriate, please do not mind.
Also, I suggest that Brother Climbing not limit himself to domestic sources when selecting articles. For technical articles of this type, the gap in quality between domestic and foreign material is enormous; rather than correcting a few scattered remarks from domestic sources, it would be better to translate excellent foreign writings.
--------------------------------------------------------
Title: Introduction to batch files
Author: Anonymous
Editor: Climbing
Source: United DOS Forum of China DOS Union
Annotations: willsort
Date: 2004-09-21
--------------------------------------------------------
Introduction to batch files

Files with the extension bat (under nt/2000/xp/2003 they can also be cmd) are batch files.
==== willsort annotation ====================================
.bat is a batch file under DOS
.cmd is another kind of batch file in the NT-kernel command-line environment
From a broader perspective, Unix shell scripts, as well as text interpreted and executed by a shell in other operating systems and even in application programs, all have functions very similar to batch files, and are likewise interpreted and executed line by line by a dedicated interpreter. The more general term for this kind of text form is script language. So to some extent, batch, unix shell, awk, basic, perl and other script languages are all the same; only their areas of application and the platforms that interpret them differ. Some application programs even still use the term batch processing, while their contents and extensions are completely different from DOS batch files.
========================================================
First of all, a batch file is a text file. Each line in this file is a DOS command (most of the time, just like the command lines we execute at the DOS prompt). You can use Edit under DOS or any text file editing tool such as Windows Notepad (notepad) to create and modify batch files.
==== willsort annotation ====================================
A batch file can perfectly well use non-DOS commands, and can even use ordinary data files that do not have executable characteristics. This is due to the involvement of Windows as a new interpretation platform, which has made the applications of batch files increasingly “marginalized.” Therefore, the batch files we discuss should be limited to the DOS environment or the command-line environment; otherwise, many concepts and assumptions would need rather large changes.
========================================================
Second, a batch file is a simple program. It can use conditional statements (if) and flow control statements (goto) to control the flow of command execution, and in batch files you can also use loop statements (for) to execute a command repeatedly. Of course, the programming ability of batch files is very limited compared with programming languages such as C, and it is also quite non-standard. The program statements in batch files are simply DOS commands one by one (including internal commands and external commands), and the capabilities of batch files mainly depend on the commands you use.
==== willsort annotation ====================================
A batch file (batch file) can also be called a batch program (batch program), and in this respect it differs somewhat from compiled languages. In C, for example, a file with the extension c or cpp can be called a C language file or C source code, but only the exe file after compilation and linking can be called a C program. Because a batch file itself has both the readability of text and the executability of a program, the boundaries between these terms are relatively blurred.
========================================================
Third, every completed batch file is equivalent to a DOS external command. You can put the directory where it is located into your DOS search path (path) so that it can be run from any location. A good habit is to create a bat or batch directory on the hard disk (for example C:\BATCH), then put all the batch files you write into that directory. That way, as long as you set c:\batch in path, you can run all the batch programs you wrote from any location.
==== willsort annotation ====================================
Strictly speaking for a DOS system, executable programs can roughly be divided into five categories. In order of execution priority from high to low, they are: DOSKEY macro commands (preloaded and resident in memory), internal commands in COMMAND.COM (entering memory at any time according to the memory environment), executable programs with the com extension (loaded directly into memory by command.com), executable programs with the exe extension (relocated and then loaded into memory by command.com), and batch programs with the bat extension (interpreted and analyzed by command.com, which calls categories 2, 3, 4, and 5 executable programs according to priority order based on its contents, analyzing one line and executing one line; the file itself is not loaded into memory)
========================================================
Fourth, under DOS and Win9x/Me systems, the AUTOEXEC.BAT batch file in the root directory of drive C: is an auto-run batch file. It runs automatically every time the system starts. You can put commands that need to run every time the system starts into this file, such as setting the search path, loading the mouse driver and disk cache, setting system environment variables, and so on. Below is an example of an autoexec.bat running under Windows 98:
@ECHO OFF
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\UCDOS;C:\DOSTools;C:\SYSTOOLS;C:\WINTOOLS;C:\BATCH
LH SMARTDRV.EXE /X
LH DOSKEY.COM /INSERT
LH CTMOUSE.EXE
SET TEMP=D:\TEMP
SET TMP=D:\TEMP
==== willsort annotation ====================================
AUTOEXEC.BAT is the auto-run batch file of the DOS system, interpreted and executed by COMMAND.COM at startup;
and in the Win9x environment, not only were many other auto-run batch files added, such as DOSSTART.BAT and WINSTART.BAT, but many variants were also added for AUTOEXEC.BAT, such as .DOS .W40 .BAK .OLD .PWS, to suit complex environments and changing needs.
========================================================

Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
JasonMing +2 2007-08-02 15:02
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 6 Posted 2004-09-22 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Many thanks to Brother Willsort for making these useful additions. Actually, judging from my own level, writing something like this really does carry the suspicion of misleading learners. Fortunately, every so-called expert started out as a newbie. Never giving up in failure and constantly trying is the real way to make progress. I wrote this little article because I saw someone post a beginner's batch file article on the forum that was full of errors everywhere (even more suspicious of misleading learners than what I wrote), and such an article was actually made featured. In order not to let the mistakes continue spreading, I corrected it on the basis of the original text (if I had been asked to write one from scratch, it might not even have been this organized).
Actually, I use batch files with nothing like Brother Willsort's professional rigor. For me, as long as it can solve the problem, that is enough. As for what method is used, how rigorous the program is, or what advanced techniques are employed, I do not particularly pursue those things. I only want my program to be simple and clear, and able to execute correctly in a specific environment. Therefore I use a large number of third-party tools in my batch programs (especially the batch utilities written by Horst), because what I believe in is "To do a good job, one must first sharpen one's tools."
My English level is really quite ordinary. Ten years after graduation, I have had almost no environment in which to use English, so reading is still manageable, but listening, speaking, and writing are a complete mess. As for translating an English work, that is even more difficult for me than ascending to heaven. But Brother Willsort's suggestion is quite pertinent. In writing specialized computer technical articles, most domestic experts seem rather impetuous in what they write (strictly speaking, they lack professional rigor, and their written expression is poor; actually I have this problem too, which is really a sign of insufficient mastery). By contrast, the things written by foreign experts feel much more comfortable to read. Therefore, when I encounter technical problems in real life, I also very much like using Google to search for English articles to solve them. There are also many people in real life who like reading translated articles, but actually I do not really approve of translation as an approach, because limited by the translator's ability, a very rigorous article may become inexpressive or even full of errors after translation. So I still hope that people who really want to do technical work will put in the effort to learn some basic English well, and then read the English originals with dictionary software. Only then can you learn more things.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 7 Posted 2004-11-14 00:00 ·  中国 山西 运城 联通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re Climbing:
I very much understand Brother Climbing's painstaking effort. If technology could only be mastered by a small number of people, then you and I would bear no responsibility for that at all. However, technology still needs to be popularized, otherwise it cannot continue to develop for long, and so we must make some effort for it. Whether translating foreign-language material or revising Chinese material, both are means of popularizing technology, and used appropriately they do more good than harm.
Over the past few days I have once again gone through the entire article and "annotated and edited" it. Because of the message length limit, I changed it to an uploaded attachment. I hope it may be of some benefit to beginners, and give experts something to reflect on as well. I still earnestly hope to receive everyone's corrections and suggestions!Open attachment
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 8 Posted 2004-11-15 00:00 ·  中国 河南 郑州 联通
中级用户
Credits 207
Posts 41
Joined 2004-10-24 00:00
21-year member
UID 32885
Gender Male
Status Offline
Thanks a lot, really good. I'm currently learning this area, but the explanation of the for command is incomplete, and I don't understand it either. Could you give some more examples?
Floor 9 Posted 2004-11-15 00:00 ·  中国 福建 厦门 电信
系统支持
★★★
Credits 904
Posts 339
Joined 2002-10-10 00:00
23-year member
UID 1904
From 厦门
Status Offline
Bookmarked
Floor 10 Posted 2004-12-21 00:00 ·  中国 江苏 扬州 仪征市 电信
初级用户
Credits 179
Posts 28
Joined 2004-12-20 00:00
21-year member
UID 34779
Gender Male
Status Offline
Thanks
Floor 11 Posted 2004-12-25 00:00 ·  中国 浙江 温州 龙湾区 电信
初级用户
Credits 165
Posts 27
Joined 2004-11-11 00:00
21-year member
UID 33555
Gender Male
Status Offline
Hehe, this thread has a lot of substance. I'm very happy to come across a study thread like this. I will definitely read it carefully. Thanks very much for providing it!!
Floor 12 Posted 2005-01-09 00:00 ·  中国 广东 潮州 电信
初级用户
Credits 102
Posts 19
Joined 2004-11-22 00:00
21-year member
UID 33910
Gender Male
Status Offline
Not bad, very practical. Thanks!
Floor 13 Posted 2005-01-14 00:00 ·  中国 重庆 渝中区 电信
银牌会员
★★★
Credits 2,165
Posts 730
Joined 2004-04-21 00:00
22-year member
UID 22966
Gender Male
Status Offline
Batch files after 2000 are very different from the original DOS ones. Commands like for in particular have become much richer.
Floor 14 Posted 2005-01-15 00:00 ·  中国 广东 茂名 电信
初级用户
Credits 161
Posts 15
Joined 2004-10-24 00:00
21-year member
UID 32886
Gender Male
Status Offline
Thanks for sharing
Floor 15 Posted 2005-01-16 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 127
Posts 9
Joined 2005-01-14 00:00
21-year member
UID 35335
Gender Male
Status Offline
I'm learning DOS right now. This is so useful. Collected. Many thanks for your work.
1 2 3 7 Next ›
Forum Jump: