- @echo off
- setlocal enabledelayedexpansion
- set "dstDrv=d:"
- ::aaa文件夹所在的目录
- set "srcPth=D:\images"
- ::源文件目录
- for /f "delims=" %%a in ('type a.txt') do (
- set "dstPth="
- for %%i in (%%a) do (
- if /i not "%%~xi"==".jpg" (
- set "dstPth=!dstPth!%%i\"
- if not exist "%dstDrv%\!dstPth!" md "%dstDrv%\!dstPth!"
- ) else (
- echo.copy "%srcPth%\%%i" "%dstDrv%\!dstPth!"
- copy "%srcPth%\%%i" "%dstDrv%\!dstPth!"
- )
- )
- )
- pause
复制代码
[ 本帖最后由 more 于 2010-4-5 16:37 编辑 ] |