回复 28# feiyan
- @echo off
- rem 文本格式 a|1.pdf|2*.pdf
- rem 批处理保存为ansi编码格式
- cd /d "C:\Users\Administrator\Desktop\test1\"
- for /f "tokens=1* delims=|" %%a in ('type "1.txt"') do (
- md "%%a" 2>nul
- set "folder=%%a"
- call :1 "%%b"
- )
- pause & exit
-
- :1
- for /f "tokens=1* delims=|" %%x in ("%~1") do (
- if exist "D:\文件数据库\%%x" (
- copy "D:\文件数据库\%%x" "%folder%"
- ) else (
- >>log.txt echo %%x
- )
- if "%%y" neq "" (
- call :1 "%%y"
- ) else (
- exit /b
- )
- )
复制代码
|