想要在各个分区建立如
D:\autorun.inf\nodel..\
这种类型的文件夹
通过
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do del /a /f /q %%a:\autorun.inf>nul 2>nul & md %%a:\autorun.inf >nul 2>nul & %%a: >nul 2>nul & cd %%a:\autorun.inf >nul 2>nul & md nodel..\ >nul 2>nul & attrib +s +h +r %%a:\autorun.inf>nul 2>nul
这样的批处理可以建立
但想把他弄成一句
如
md D:\autorun.inf\nodel..\
建立的却是普通的文件夹
如果我想使用
subst 命令将 D:\autorun.inf\nodel..\
这个目录指派到虚拟的分区
那该怎么写??
@ECHO OFF
md D:\autorun.inf >nul 2>nul & D: >nul 2>nul & cd D:\autorun.inf >nul 2>nul & md nodel..\ >nul 2>nul & attrib +s +h +r D:\autorun.inf>nul 2>nul
IF EXIST X:\NUL GOTO DELETE
SUBST X: "D:\autorun.inf\nodel..\"
START X:\
GOTO END
:DELETE
SUBST /D X:
:END
这样的话会提示找不到路径...