请教一个批处理的含义
本帖最后由 有阴也有阳 于 2016-9-19 21:35 编辑请教下面一个批处理的含义:
@echo off
SHSUCDX /D:?PATACD01 /D:?SATACD01 /D:?SATACD02 /D:?SATACD03 /D:?USB-CD
findcd /s>nul
for %%i in (z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c) do if exist %%i:......
特别是其中的:
SHSUCDX /D:?PATACD01 /D:?SATACD01 /D:?SATACD02 /D:?SATACD03 /D:?USB-CD
是啥意思?
还有:
findcd /s>nul
是啥意思?
请高手赐教,谢谢!!!
等了半天,没有人回答,自己百度的资料:
@ECHO OFF //关闭回显
SHSUCDX /D:?PATACD01 // 这里的“?”是防止光驱设备名不当而出现错误信息;如果设备名不是IDE-CD, SHSUCDX就会忽略这一错误。
SHSUCDX /D:?PATACD01 /D:?SATACD01 /D:?SATACD02 /D:?SATACD03 /D:?USB-CD // 整行是寻找光驱设备从IDE——CD、SATA——CD
到USB——CD
问一句“:这里大写的字母‘D’是代表设备的意思吗?是单词设备的缩写吗?”
findcd /s>nul //找到光驱盘符
for %%i in (z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c) do //从C——Z中找到光驱盘符
该才在微博看到一头奶牛自己喝自己的奶,楼主就来了个自己的问题自己答,哈哈哈哈 nttwqz 发表于 2016-9-19 21:08
该才在微博看到一头奶牛自己喝自己的奶,楼主就来了个自己的问题自己答,哈哈哈哈
等了半天没人回答,就去百度,以上内容百度来的,但还有一事不明:
这里大写的字母‘D’是代表设备的意思吗?是单词设备的缩写吗? 有阴也有阳 发表于 2016-9-19 21:34
等了半天没人回答,就去百度,以上内容百度来的,但还有一事不明:
这里大写的字母‘ ...
像这么“低级”的问题,我也不知道,印象中好像在某个Dos盘里见过这个SHSUCDX,你看下它的帮助不就可以了,即使是英文的也可以翻译。。。 Command: shsucdx
SHSUCDX is an unloadable CD-ROM redirector substitute for MSCDEX.
It supports up to 10 drives. Each drive is single-sector buffered and
the last 10 directory entries are cached. Each unit from each driver
can be assigned a specific drive letter.
Syntax:
shsucdx /D[:][?|*]driver[,[,[,]]]
DRIVER is the name of the device driver installed to control
the CD-ROM drive. Prefixing the driver with '?' will
silently ignore it if it does not exist (or is not actually a
CD-ROM); prefixing with '*' will also ignore it, but a
drive will be reserved (see below).
LETTER is the first drive letter to assign to the units on
this driver. Thedefault is the first available letter.
Note: the drive letters assigned to subsequent units will
always be higher than those assigned to previous units.
UNIT is the first unit on this driver to be assigned a drive.
Unit 0 is the default.
MAX is the maximum number of units on this driver to be assigned
drives. The default is all units (or all remaining units, if
UNIT is given).
(Syntax)
Options:
/DDriver: This option is used to specify the name of the device
driver. It can also indicate which unit(s) should be assigned and
to what letter.
Drive manipulation: At install time, /D can also be used to
reserve space for additional drives. Use a single digit to indicate
how many drives should be reserved (eg: /D1). (If you should happen
to have a device driver name with a single digit, use the '?'
prefix.) After installation, the same option will remove the
drive(s) that were last assigned. It is possible to specify both
forms of /D, in which case the current drive(s) will be removed,
then the new drive(s) added. You can only use a drive letter which
is smaller or even with the letter in LASTDRIVE / LASTDRIVEHIGH.
/LLetter: This option is an alternative to the LETTER component of
/D, which it must follow (ie: /D:driver /L:letter). It can also be
used to return the number of drives installed (/L:0, will return 255
if not installed) and the letter of each assigned drive (/L:1, /L:2,
etc., with A: = 1 and 255 if the drive is not assigned). You can only
use a drive letter which is smaller or even with the letter in
LASTDRIVE / LASTDRIVEHIGH.
/CUses conventional instead of high memory.
/VMemory statistics: When this option is used at installation, a
summary of memory usage will be displayed. This summary includes:
Static Code and variables
DynamicData for each drive and paragraph rounding
Total Overall memory usage
Information: When used with /?, or after installation, this
option displays the compile- and run-time options of SHSUCDX. This
information includes:
8086/386 The minimum processor required
CD root formTRUENAME will return \\D.\A.\ instead of D:\
High Sierra The original format for the CD file system
Joliet The Windows format for long names
Image on CD Enables access to an image which is itself on a CD
/~ Tilde usage: The ISO standard allows for CDs to have names up to
31 characters and Joliet can have names up to 64 characters. When
this is reduced to 8.3 for DOS it may lead to duplicated entries.
This option will remove the duplication by appending a tilded
number after the name (similar to what Windows does). By default,
tildes are off.
This option is also available after installation. By itself it will
toggle the status (ie. if tildes are currently on, /~ will turn
them off and vice versa). Tildes can be explicitly turned on or
off by adding a '+' or '-' sign (ie: /~+ will turn tildes on,
irrespective of the current state). You do not have these problems
when using the program DOSLFN.
/RRemoves Read-only attribute.
/IInstall anyway even if another redirector is present.
/UUnloads the shsucdx driver from memory.
/QQuiet. Prevents display of the sign-on banner (copyright notice). nttwqz 发表于 2016-9-19 21:50
Command: shsucdx
SHSUCDX is an unloadable CD-ROM redirector substitute for MSCDEX.
谢谢热心回复!!! 顶你!辛苦了~
static/image/common/sigline.gif
数据库技术:http://www.huatian123.com/forum-37-1.html 好象此批处理源于微软的 DOS 启动盘.
%~dpI - 仅将 %I 扩展到一个驱动器号和路径
%~nxI - 仅将 %I 扩展到一个文件名和扩展名
%~fsI - 仅将 %I 扩展到一个带有短名的完整路径名
%~dp$PATH:I - 搜索列在路径环境变量的目录,并将 %I 扩展
到找到的第一个驱动器号和路径。
%~ftzaI - 将 %I 扩展到类似输出线路的 DIR
这些参数怎么个意思,能举个简单的例子吗?
alltask 发表于 2016-10-21 20:17
%~dpI - 仅将 %I 扩展到一个驱动器号和路径
%~nxI - 仅将 %I 扩展到一个文件名和扩展名
...
echo off
echo %~dp0
pause
把上面的批处理在不同目录运行下你就明白了
页:
[1]