|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
    『楼 主』:
[推荐新手]批处理新手FAQ整理
使用 LLM 解释/回答一下
首先欢迎各位DOS爱好者进入中国DOS联盟批处理室学习讨论问题.
如果你刚刚注册帐号,请阅读这篇文章,它可以使你避免很多不必要的/重复的提问和发贴.
如果你是刚来的新手,我先提几点小小的要求吧:
1、发贴求助之前请先搜索一下论坛,因为你提的问题可能早就被解决了至少不止一次了;
2、如果经过了自己的思考和搜索仍然没有解决自己的问题,那么就发求助贴,千万要注意标题要表达贴子的主要意思,这样才有更多的人来关注你的问题;
3、切忌在论坛里面侮辱他人人格,违反版规。
Question0:
高手请进!
急!!!!!!!!!!
跪求!!
谁能帮帮我????
一个很棘手的问题!
Answer:
如果你发贴的标题是这样的,可以先看看这里:
http://www.cn-dos.net/forum/viewthread.php?tid=1415
Question1:
看见很多批处理代码里面有很多符号,比如(% ^ | ! ~),不知道具体有什么作用?
Answer:
如果你碰见了关于符号的问题,可以参考下面这个:
http://www.cn-dos.net/forum/viewthread.php?tid=30985
Question2:
像“%date:~0,10%”这样的语句是什么意思啊?
Answer:
这是CMD的一个变量截取功能,可以截取变量指定位置的字符,具体用法可以参考下面这个贴子:
http://www.cn-dos.net/forum/viewthread.php?tid=25746
Question3:
什么是变量延迟,批处理里面的“Setlocal EnableDelayedExpansion”有什么用?
Answer:
参考下面这两个贴子,相信你对变量延迟就会有一定的认识:
http://www.cn-dos.net/forum/viewthread.php?tid=20733
http://www.cn-dos.net/forum/viewthread.php?tid=28273
Question4:
for命令好难啊,具体怎么用啊?
Answer:
认真看了下面几个贴子之后,包你掌握for命令的常见用法:
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
很多贴子里面都有for的使用,如果你潜水时间够长包你掌握for的用法!
Question5:
for命令里面的%%~fa是什么意思?
Answer:
在命令行里面输入for /?,看最后面的部分。
PS:很多命令的用法都包含在自身的帮助文档里面,只要你用心去看了,肯定会学到不少东西。
Question6:
如何创建一个空文件?
Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=22336
Question7:
批处理如何延时之后执行一个命令?
Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=23475#pid140849
Question8:
重定向是怎么一回事?
Answer:
http://www.cn-dos.net/forum/viewthread.php?tid=16942#pid115734
Question9:
批处理提示wget、sed或者gawk不是内部命令也不是外部命令,怎么办?
Answer:
wget、sed和gawk都是第三方工具,需要下载之后,放在系统可搜索路径或者当前目录下运行,可以在下面这个附件专贴里面下载得到:
http://www.cn-dos.net/forum/viewthread.php?tid=25914
Question10:
set string=%string:AAA=BBB%是什么意思?
Answer:
这是cmd的字符替换功能,即将变量“string”中的字符“AAA”替换成“BBB”。
Question11:
if %str% gtr 255 command 中的“gtr”是什么意思?
Answer:
这是if的比较运算符:
EQU - 等于
NEQ - 不等于
LSS - 小于
LEQ - 小于或等于
GTR - 大于
GEQ - 大于或等于
Last edited by lxmxn on 2007-10-7 at 06:45 PM ]
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 ]
|
|
2007-10-3 20:29 |
|
|
my3439955
中级用户
  
积分 272
发帖 99
注册 2006-6-2
状态 离线
|
|
2007-10-3 20:36 |
|
|
viplsd
新手上路

积分 1
发帖 1
注册 2007-10-3
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
好好好好好好好好好好好好好好好
Well well well well well well well well well well well well well well well
|
|
2007-10-4 13:34 |
|
|
putao
初级用户
 
积分 80
发帖 41
注册 2007-10-5
状态 离线
|
『第 4 楼』:
不错比较全
使用 LLM 解释/回答一下
中国DOS联盟 高手真多
China DOS Union. There are really many experts.
|

http://user.qzone.qq.com/182365808 |
|
2007-10-5 15:28 |
|
|
zwdeee
初级用户
 
积分 153
发帖 54
注册 2007-6-20
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
太好了,就是"Question2:"下面的连接好象贴错了吧
Great, it seems that the link under "Question2:" was posted incorrectly.
|
|
2007-10-7 08:08 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
多谢zwdeee指正,链接已修复。
Thanks to zwdeee for correction, the link has been fixed.
|
|
2007-10-7 18:46 |
|
|
huanghourun
新手上路

积分 6
发帖 3
注册 2006-11-27
状态 离线
|
|
2007-10-10 00:46 |
|
|
z83001
新手上路

积分 19
发帖 13
注册 2007-4-22
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
谢谢提醒,新手多学习对自己有好处
Thanks for the reminder. Newcomers can benefit a lot from learning more.
|
|
2007-10-10 22:15 |
|
|
regvip2008
初级用户
 
积分 187
发帖 87
注册 2007-10-23
状态 离线
|
|
2007-10-23 16:58 |
|
|
blue812
初级用户
 
积分 57
发帖 29
注册 2006-9-27
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
很不错,对我们新学者很有帮助.谢谢!
It's very good and very helpful for our new learners. Thanks!
|
|
2007-10-29 17:27 |
|
|
jfsy
初级用户
 
积分 26
发帖 14
注册 2007-1-7
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
太好了,我正在学批处理,谢谢提供
Great! I'm learning batch processing, thank you for providing.
|
|
2007-11-1 12:59 |
|
|
honeyxiaoyi
新手上路

积分 6
发帖 3
注册 2007-9-17
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
咱也来学习批处理。。。。支持中国dos联盟
Let's also learn batch processing... Support China DOS Union
|
|
2007-11-3 19:37 |
|
|
lhweiy
新手上路

积分 19
发帖 10
注册 2006-10-18
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
多谢楼主了
学习学习。
Thanks to the landlord.
Learn and study.
|
|
2007-11-3 22:45 |
|
|
hongying915
新手上路

积分 14
发帖 7
注册 2007-11-7
状态 离线
|
|
2007-11-7 23:05 |
|
|
wangmail
新手上路

积分 17
发帖 9
注册 2007-1-17
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
要点积分看别的东西
Points are for looking at other things
|
|
2007-11-8 23:24 |
|