- @echo off&setlocal enabledelayedexpansion
- dir E:\htdocs\j15\components /b /s /O:N /A:D > com_list.txt
- for /f "delims=" %%a in ('findstr "views.*tmpl" com_list.txt') do (
- set "str=%%a"&set "str=!str:\j15\=\new\!"
- set "str=!str:\views\=\!"
- echo %%a
- echo !str:\tmpl\=\!
- xcopy %%a !str:\tmpl=\! /E /I
- )
- dir E:\htdocs\j15\modules /b /s /O:N /A:D > mod_list.txt
- for /f "delims=" %%a in ('findstr "*tmpl" mod_list.txt') do (
- set "str=%%a"&set "str=!str:\j15\=\new\!"
- echo %%a
- echo !str:\tmpl\=\!
- xcopy %%a !str:\tmpl=\! /E /I
- )
- pause>nul
复制代码 谢谢batman!经修改,问题解决了,不过我写得有点啰嗦了 |