|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
从批处理程序调用另一个批处理程序。
CALL filename
batch-parameters 指定批处理程序所需的命令行信息。
如果命令扩展名被启用,CALL 会如下改变:
CALL 命令现在将卷标当作 CALL 的目标接受。语法是:
CALL:label arguments
一个新的批文件上下文由指定的参数所创建,控制在卷标被指定
后传递到语句。您必须通过达到批脚本文件末两次来 "exit" 两次。
第一次读到文件末时,控制会回到 CALL 语句的紧后面。第二次
会退出批脚本。键入 GOTO /?,参看 GOTO : EOF 扩展名的描述,
此描述允许您从一个批脚本返回。
另外,批脚本文本参数参照(%0、%1、等等)已如下改变:
批脚本里的 %* 指出所有的参数(如 %1 %2 %3 %4 %5 ...)
批参数(%n)的替代已被增强。您可以使用以下语法:
%~1 - 删除引号("<img src="images/smilies/face-wink.png" align="absmiddle" border="0">,扩充 %1
%~f1 - 将 %1 扩充到一个完全合格的路径名
%~d1 - 仅将 %1 扩充到一个驱动器号
%~p1 - 仅将 %1 扩充到一个路径
%~n1 - 仅将 %1 扩充到一个文件名
%~x1 - 仅将 %1 扩充到一个文件扩展名
%~s1 - 扩充的路径指含有短名
%~a1 - 将 %1 扩充到文件属性
%~t1 - 将 %1 扩充到文件的日期/时间
%~z1 - 将 %1 扩充到文件的大小
%~$PATH : 1 - 查找列在 PATH 环境变量的目录,并将 %1
扩充到找到的第一个完全合格的名称。如果环境
变量名未被定义,或者没有找到文件,此组合键会
扩充到空字符串
可以组合修定符来取得多重结果:
%~dp1 - 只将 %1 扩展到驱动器号和路径
%~nx1 - 只将 %1 扩展到文件名和扩展名
%~dp$PATH:1 - 在列在 PATH 环境变量中的目录里查找 %1,
并扩展到找到的第一个文件的驱动器号和路径。
%~ftza1 - 将 %1 扩展到类似 DIR 的输出行。
在上面的例子中,%1 和 PATH 可以被其他有效数值替换。
%~ 语法被一个有效参数号码终止。%~ 修定符不能跟 %*
使用
Calling another batch program from a batch program.
CALL filename
batch-parameters Specifies command-line information needed by the batch program.
If command extensions are enabled, CALL changes as follows:
The CALL command now accepts labels as targets for CALL. The syntax is:
CALL:label arguments
A new batch file context is created with the specified arguments, and control is passed to the statement after the label is specified. You must "exit" twice by reaching the end of the batch script twice. The first time the end of the file is read, control returns to immediately after the CALL statement. The second time exits the batch script. Type GOTO /? to see the description of the GOTO : EOF extension, which allows you to return from a batch script.
In addition, batch script text parameter references (%0, %1, etc.) have changed as follows:
%* in a batch script indicates all parameters (such as %1 %2 %3 %4 %5 ...)
Substitution of batch parameters (%n) has been enhanced. You can use the following syntax:
%~1 - Remove quotes (") and expand %1
%~f1 - Expand %1 to a fully qualified pathname
%~d1 - Expand %1 to just a drive letter
%~p1 - Expand %1 to just a path
%~n1 - Expand %1 to just a filename
%~x1 - Expand %1 to just a file extension
%~s1 - Expanded path contains short names
%~a1 - Expand %1 to file attributes
%~t1 - Expand %1 to file date/time
%~z1 - Expand %1 to file size
%~$PATH:1 - Search directories listed in the PATH environment variable and expand %1 to the first fully qualified name found. If the environment variable name is not defined or the file is not found, this combination expands to an empty string
You can combine modifiers to get multiple results:
%~dp1 - Expand %1 to just drive letter and path
%~nx1 - Expand %1 to just filename and extension
%~dp$PATH:1 - Search directories listed in the PATH environment variable for %1 and expand to the drive letter and path of the first file found.
%~ftza1 - Expand %1 to a DIR-like output line.
In the above examples, %1 and PATH can be replaced with other valid values. The %~ syntax is terminated by a valid parameter number. %~ modifiers cannot be used with %*
|
|
2003-11-29 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
显示或设置活动代码页编号。
CHCP
nnn 指定代码页编号。
不加参数键入 CHCP 显示活动代码页编号
Displays or sets the active code page number.
CHCP
nnn Specifies the code page number.
Typing CHCP without a parameter displays the active code page number
|
|
2003-11-29 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
显示当前目录名或改变当前目录。
CHDIR
CHDIR
CD
CD
.. 指定要改成父目录。
键入 CD 驱动器: 显示指定驱动器中的当前目录。
不带参数只键入 CD,则显示当前驱动器和目录。
使用 /D 命令行开关,除了改变驱动器的当前目录之外,
还可改变当前驱动器。
如果扩展命令名被启用,CHDIR 会如下改变:
当前的目录字符串会被转换成使用磁盘名上的大小写。所以,
如果磁盘上的大小写如此,CD C : \TEMP 会将当前目录设为
C:\Temp。
CHDIR 命令不把空格当作分隔符,因此有可能将目录名改为一个
带有空格但不带有引号的子目录名。例如:
cd \winnt\profiles\username\programs\start menu
与下列相同:
cd "\winnt\profiles\username\programs\start menu"
在扩展功能停用的情况下,您必须键入以上命令。
Displays the name of the current directory or changes the current directory.
CHDIR
CHDIR
CD
CD
.. Specifies to change to the parent directory.
Typing CD drive: displays the current directory on the specified drive.
Typing CD without parameters displays the current drive and directory.
Using the /D command-line switch, in addition to changing the current directory of the drive,
it can also change the current drive.
If the extended command name is enabled, CHDIR will change as follows:
The current directory string will be converted to use the case on the disk name. So,
if the case on the disk is like this, CD C : \TEMP will set the current directory to
C:\Temp.
The CHDIR command does not treat spaces as delimiters, so it is possible to change the directory name to a
subdirectory name with spaces but without quotes. For example:
cd \winnt\profiles\username\programs\start menu
Is the same as:
cd "\winnt\profiles\username\programs\start menu"
When the extended function is disabled, you must type the above command.
|
|
2003-11-29 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
在启动时显示或修改磁盘检查。
CHKNTFS volume
CHKNTFS /D
CHKNTFS /T\r\nCHKNTFS /X volume
CHKNTFS /C volume
volume: 指定驱动器(后面跟一个冒号)、装入点
或卷名。
/D 将计算机恢复成默认状态, 启动时检查所有驱动器,
并对有问题的驱动器执行 chkdsk 命令。
/T:time 将 AUTOCHK 初始递减计数时间改成指定的
时间量,单位为秒数。如果没有指定
时间,则显示当前设置。
/X 排除启动时不作检查的驱动器。上次执行此命令
排除的驱动器此时无效。
/C 安排启动时检查驱动器,如果驱动器有问题,运行 chkdsk。
如果没有指定命令行开关,CHKNTFS 会显示每一驱动器有问题的位的状态。
Display or modify disk checks at startup.
CHKNTFS volume
CHKNTFS /D
CHKNTFS /T\r\nCHKNTFS /X volume
CHKNTFS /C volume
volume: Specifies a drive (followed by a colon), mount point,
or volume name.
/D Restores the computer to the default state, checks all
drives at startup, and runs chkdsk on drives with issues.
/T:time Changes the AUTOCHK initial countdown time to the specified
amount in seconds. If no time is specified, displays the current setting.
/X Excludes drives that are not checked at startup. Drives excluded
in the last execution of this command are invalid at this time.
/C Schedules checking of drives at startup, and runs chkdsk if the drive has issues.
If no command-line switches are specified, CHKNTFS displays the status of the problem bits for each drive.
|
|
2003-11-29 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
COMP ]
data1 指定要比较的第一个文件的位置和名称。
data2 指定要比较的第二个文件的位置和名称。
/D 用十进制格式显示不同处。
/A 用 ASCII 字符显示不同处。
/L 显示不同的行数。
/N=number 只比较每个文件中第一个指定的行数。
/C 比较文件时不分 ASCII 字母的大小写。
/OFF 不要跳过带有脱机属性集的文件。
要比较文件集,在 data1 和 data2 参数中使用通配符。
COMP ]
data1 Specifies the location and name of the first file to compare.
data2 Specifies the location and name of the second file to compare.
/D Displays differences in decimal format.
/A Displays differences using ASCII characters.
/L Displays the number of different lines.
/N=number Compares only the first specified number of lines in each file.
/C Compares files without distinguishing between uppercase and lowercase ASCII letters.
/OFF Does not skip files with the offline attribute set.
To compare a set of files, use wildcards in the data1 and data2 parameters.
|
|
2003-11-29 00:00 |
|
|
tanz
初级用户
 
积分 166
发帖 17
注册 2003-12-4
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
A:\赤月1127>RD E:\Qq2003\10221811 /S /Q
Invalid switch - /S
A:\赤月1127>RD E:\Qq2003\10221811 /S /Q
Invalid switch - /S
The text you provided is already in English. So the output remains the same:
A:\赤月1127>RD E:\Qq2003\10221811 /S /Q
Invalid switch - /S
|
|
2003-12-4 00:00 |
|
|
tanz
初级用户
 
积分 166
发帖 17
注册 2003-12-4
状态 离线
|
|
2003-12-4 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
显示文本文件的内容。
TYPE filename
Display the contents of a text file.
TYPE filename
|
|
2003-12-5 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
在文件中搜索字符串。
FIND ] "string" filename]
/V 显示所有未包含指定字符串的行。
/C 仅显示包含字符串的行数。
/N 显示行号。
/I 搜索字符串时忽略大小写。
/OFF 不要跳过具有脱机属性集的文件。
"string" 指定要搜索的文字串,
filename
指定要搜索的文件。
如果没有指定路径,FIND 将搜索键入的或者由另一命令产生的文字。
Search for a string in a file.
FIND ] "string" filename]
/V Display all lines that do NOT contain the specified string.
/C Display only the count of lines that contain the string.
/N Display line numbers.
/I Ignore case when searching for the string.
/OFF Do not skip files with offline attribute set.
"string" Specifies the text string to search for.
filename
Specifies the file(s) to search.
If no path is specified, FIND searches the text typed in or generated by another command.
|
|
2003-12-5 00:00 |
|
|
kkqq123
初级用户
 
积分 236
发帖 28
注册 2003-11-13
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
设置默认的控制台前景和背景颜色。
COLOR
attr 指定控制台输出的颜色属性
颜色属性由两个十六进制数字指定 -- 第一个为背景,第二个则为
前景。每个数字可以为以下任何值之一:
0 = 黑色 8 = 灰色
1 = 蓝色 9 = 淡蓝色
2 = 绿色 A = 淡绿色
3 = 湖蓝色 B = 淡浅绿色
4 = 红色 C = 淡红色
5 = 紫色 D = 淡紫色
6 = 黄色 E = 淡黄色
7 = 白色 F = 亮白色
如果没有给定任何参数,该命令会将颜色还原到 CMD.EXE 启动时
的颜色。这个值来自当前控制台窗口、/T 开关或
DefaultColor 注册表值。
如果用相同的前景和背景颜色来执行 COLOR 命令,COLOR 命令
会将 ERRORLEVEL 设置为 1。
例如: "COLOR fc" 在亮白色上产生亮红色
Set default console foreground and background colors.
COLOR
attr Specifies the color attributes of console output
The color attribute is specified by two hexadecimal digits -- the first
is the background, the second is the foreground. Each digit can be one of the
following values:
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
If no argument is given, the command resets the color to what it was when
CMD.EXE started. This value is either from the current console window, the
/T switch, or the DefaultColor registry value.
If the COLOR command is executed with the same foreground and background
colors, the COLOR command sets the ERRORLEVEL to 1.
For example: "COLOR fc" produces bright red on bright white
|
|
2003-12-5 00:00 |
|
|
passer98
初级用户
 
积分 109
发帖 2
注册 2003-9-21
状态 离线
|
|
2003-12-25 00:00 |
|
|
heiniao
初级用户
 
积分 105
发帖 1
注册 2003-12-26
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
也可参看"洪恩在线-DOS".
You can also refer to "Hongen Online - DOS".
|
|
2003-12-26 00:00 |
|
|
QUNET
初级用户
 
积分 105
发帖 1
注册 2003-12-28
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
龙王的 快速精通DOS6.22 真不错
The "Quick Mastery of DOS 6.22" by Long Wang is really good.
|
|
2003-12-28 00:00 |
|
|
♂一切随风
初级用户
 
积分 118
发帖 5
注册 2003-12-10
状态 离线
|
|
2003-12-28 00:00 |
|
|
sub
初级用户
 
积分 112
发帖 3
注册 2003-12-29
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
网费贵啊`~~~~~可以整理好它吗~~~`~~让打包走就更好啦~~`
Internet fees are expensive~~~~~Can you organize it?~~~`~~It would be even better if it could be packed and taken away~~`
|
|
2003-12-30 00:00 |
|