- @echo off
- set "源文件=d:\1.txt"
- set "目标盘符=c d e"
- set "目标文件夹=123\test\"
- set "IP列表文件=ip.txt"
-
- for /f "usebackq" %%i in ("%IP列表文件%") do (
- for %%d in (%目标盘符%) do (
- if exist "\\%%i\%%d$:\%目标文件夹%" (
- copy "%源文件%" "\\%%i\%%d$:\%目标文件夹%"
- set copy_success=#
- )
- )
- if not defined copy_success echo \\%%i 下不存在目标文件夹
- set copy_success=
- )
-
- pause
复制代码
|