@echo off
if "%1"=="h" goto begin
start mshta vbscript:createobject("wscript.shell").run(""%0" h",0,false)(window.close)&&exit
:begin
cd /d d:
for /f %%i in (dir /s/b d:\ *.txt) do copy "%%i" e:\file
这样,可以实现隐藏cmd窗口自动复制
编辑一个批处理文件,内容为下面两行
d:
for /r d:\ %%i in (*.txt) do copy "%%i" e:\file
如果直接在Dos窗口下运行,将 %%i 改成 %i