本帖最后由 terse 于 2015-11-17 19:03 编辑
你希望怎么处理重复文件夹 | @echo off & setlocal enabledelayedexpansion | | set "share=192.168.1.7\查询目录" | | set "fd=文件名" | | for /f "delims=" %%a in ('dir /ad /b /s "%share%\%fd%?"') do ( | | if /i "%%~nxa" == "%fd%" ( | | set /a n+=1 | | xcopy /s /h /c /y "%%a" "E:\new\%fd%_!n!\" | | ) | | ) | | pauseCOPY |
|