- @echo off
- for /F "tokens=1* delims=|" %%a in (D:\a.txt) do for /F "tokens=1*" %%c in ("%%a") do call:hanye %%c\%%d %%b
- goto :eof
- :hanye
- if not exist "D:\images\%1" md "D:\images\%1"
- if not "%2"=="" copy "D:\images\%2" "D:\images\%1">nul&shift/2&goto hanye
复制代码 要求:
1,a.txt 中文件目录与文件名使用 | 分隔
2,目录名及文件名中不能有空格
3,a.txt 示例如下:
aaa bbb | a.jpg b.jpg c.jpg
aaa | d.jpg |