再假设B文件夹下只有 c1,c2,... 直属文件夹,但要复制包括A文件夹结构及其全部内容,代码如下存为 test-2.bat,在与 A,B 文件夹相同的目录中运行...复制代码
- @echo off & for /d %%d in (B\*) do (xcopy ".\A" "%%d" /s/i/y) 2>nul
- pause&exit/b
复制代码
- @echo off & for /d %%d in (B\*) do (xcopy ".\A" "%%d\A" /s/i/y) 2>nul
- pause&exit/b
复制代码
- @echo off & for /d %%d in (*) do if /i "%%d" neq "A" xcopy "A" "%%d\A" /s/i/y
- pause&exit/b
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |