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-23 07:30
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Recommended for Novices] FAQ Compilation for Batch Processing Novices StickyII View 112,625 Replies 177
Original Poster Posted 2007-10-03 20:29 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
First of all, welcome all DOS enthusiasts to enter the batch processing room of the China DOS Union to study and discuss issues.
If you have just registered an account, please read this article, which can help you avoid many unnecessary/repeated questions and posts.

If you are a new user just arriving, I will put forward a few small requirements:

1. Before posting for help, please search the forum first, because the problem you raise may have been solved at least more than once;
2. If after your own thinking and searching, you still haven't solved your problem, then post a help post. Be sure to pay attention that the title should express the main meaning of the post, so that more people will pay attention to your problem;
3. Do not insult the personality of others in the forum, which violates the forum rules.

Question0:
Experts, please come in!
Urgent!!!!!!!!!!
Kneeling to beg!!
Who can help me????
A very difficult problem!

Answer:
If the title of your post is like this, you can first take a look here:
http://www.cn-dos.net/forum/viewthread.php?tid=1415

Question1:
I see that there are many symbols in many batch processing codes, such as (% ^ |! ~), I don't know what their specific functions are?

Answer:
If you encounter a problem about symbols, you can refer to the following:
http://www.cn-dos.net/forum/viewthread.php?tid=30985

Question2:
What does a statement like "%date:~0,10%" mean?

Answer:
This is a variable intercepting function of CMD, which can intercept the characters at the specified position of the variable. For the specific usage, you can refer to the following post:
http://www.cn-dos.net/forum/viewthread.php?tid=25746

Question3:
What is variable delay, and what is the use of "Setlocal EnableDelayedExpansion" in batch processing?

Answer:
Refer to the following two posts, and I believe you will have a certain understanding of variable delay:
http://www.cn-dos.net/forum/viewthread.php?tid=20733
http://www.cn-dos.net/forum/viewthread.php?tid=28273

Question4:
The for command is so difficult, how to use it specifically?

Answer:
After carefully reading the following several posts, you will definitely master the common usages of the for command:
http://www.cn-dos.net/forum/viewthread.php?tid=19331
http://www.cn-dos.net/forum/viewthread.php?tid=13592
http://www.cn-dos.net/forum/viewthread.php?tid=33751
There are many posts with the use of for. If you have been lurking long enough, you will definitely master the usage of for!

Question5:
What does %%~fa in the for command mean?

Answer:
Enter for /? in the command line and look at the last part.
PS: The usage of many commands is included in their own help documents. As long as you read them carefully, you will definitely learn a lot.

Question6:
How to create an empty file?

Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=22336


Question7:
How does batch processing execute a command after delay?

Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=23475#pid140849


Question8:
What is redirection?

Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=16942#pid115734

Question9:
The batch processing prompts that wget, sed or gawk are not internal commands or external commands. What should I do?

Answer:
wget, sed and gawk are all third-party tools. They need to be downloaded and placed in the system search path or the current directory to run. You can download them from the following special attachment post:
http://www.cn-dos.net/forum/viewthread.php?tid=25914


Question10:
What does set string=%string:AAA=BBB% mean?

Answer:
This is the character replacement function of cmd, that is, replacing the character "AAA" in the variable "string" with "BBB".


Question11:
What does "gtr" mean in if %str% gtr 255 command?

Answer:
This is the comparison operator of if:
EQU - equal
NEQ - not equal
LSS - less than
LEQ - less than or equal
GTR - greater than
GEQ - greater than or equal



[ Last edited by lxmxn on 2007-10-7 at 06:45 PM ]
Recent Ratings for This Post ( 6 in total) Click for details
RaterScoreTime
my3439955 +4 2007-10-03 20:35
fengjian +1 2007-10-31 18:08
qzwqzw +15 2008-08-08 08:33
523066680 +15 2009-02-04 18:46
ligui0001 +2 2009-11-07 21:21
zzxjypm +1 2010-05-19 18:31
Floor 2 Posted 2007-10-03 20:36 ·  中国 山东 淄博 联通
中级用户
★★
Credits 272
Posts 99
Joined 2006-06-02 09:12
20-year member
UID 56414
Status Offline
relatively comprehensive
Floor 3 Posted 2007-10-04 13:34 ·  中国 浙江 绍兴 电信
新手上路
Credits 1
Posts 1
Joined 2007-10-03 12:17
18-year member
UID 98821
Gender Male
Status Offline
Well well well well well well well well well well well well well well well
Floor 4 Posted 2007-10-05 15:28 ·  中国 四川 成都 电信
初级用户
Credits 80
Posts 41
Joined 2007-10-05 14:44
18-year member
UID 98965
Gender Male
Status Offline
China DOS Union. There are really many experts.
http://user.qzone.qq.com/182365808
Floor 5 Posted 2007-10-07 08:08 ·  中国 湖北 黄冈 电信
初级用户
★★
Credits 153
Posts 54
Joined 2007-06-20 18:24
19-year member
UID 91903
Gender Male
Status Offline
Great, it seems that the link under "Question2:" was posted incorrectly.
Floor 6 Posted 2007-10-07 18:46 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Thanks to zwdeee for correction, the link has been fixed.
Floor 7 Posted 2007-10-10 00:46 ·  中国 广东 惠州 电信
新手上路
Credits 6
Posts 3
Joined 2006-11-27 08:38
19-year member
UID 71867
Gender Male
Status Offline
Can learn a lot of things
Floor 8 Posted 2007-10-10 22:15 ·  中国 辽宁 葫芦岛 联通
新手上路
Credits 19
Posts 13
Joined 2007-04-22 21:29
19-year member
UID 86103
Gender Male
Status Offline
Thanks for the reminder. Newcomers can benefit a lot from learning more.
Floor 9 Posted 2007-10-23 16:58 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 187
Posts 87
Joined 2007-10-23 16:04
18-year member
UID 100558
Gender Male
Status Offline
Thanks for sharing, learned it~~
Floor 10 Posted 2007-10-29 17:27 ·  中国 广东 珠海 电信
初级用户
Credits 57
Posts 29
Joined 2006-09-27 02:04
19-year member
UID 63754
Status Offline
It's very good and very helpful for our new learners. Thanks!
Floor 11 Posted 2007-11-01 12:59 ·  中国 重庆 万州区 电信
初级用户
Credits 26
Posts 14
Joined 2007-01-07 22:46
19-year member
UID 75748
Gender Male
Status Offline
Great! I'm learning batch processing, thank you for providing.
Floor 12 Posted 2007-11-03 19:37 ·  中国 山东 潍坊 联通
新手上路
Credits 6
Posts 3
Joined 2007-09-17 15:03
18-year member
UID 97623
Gender Male
Status Offline
Let's also learn batch processing... Support China DOS Union
Floor 13 Posted 2007-11-03 22:45 ·  中国 河南 三门峡 联通
新手上路
Credits 19
Posts 10
Joined 2006-10-18 10:31
19-year member
UID 66327
Status Offline
Thanks to the landlord.
Learn and study.
Floor 14 Posted 2007-11-07 23:05 ·  中国 广东 广州 天河区 电信
新手上路
Credits 14
Posts 7
Joined 2007-11-07 00:29
18-year member
UID 101941
Gender Male
Status Offline
It's much more convenient. Thanks.
Floor 15 Posted 2007-11-08 23:24 ·  中国 吉林 四平 联通
新手上路
Credits 17
Posts 9
Joined 2007-01-17 15:43
19-year member
UID 76818
Gender Male
Status Offline
Points are for looking at other things
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
xuwm1985 +1 2008-03-17 17:28
1 2 3 12 Next ›
Forum Jump: