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