本帖最后由 qixiaobin0715 于 2021-11-23 12:42 编辑
回复 1# alick
你应当说明最终要实现什么目的,我觉得直接修改aaa.bat即可:- set /p filename=<list.txt
- for /f "delims=" %%a in ('dir /b /s /a-d goto3\bbb.exe') do ren "%%a" "%filename%.exe"
- for /f "delims=" %%i in ('dir /b /s /a-d goto3\%filename%.exe') do ...
复制代码 实际上用一个for循环也可以定位重命名后的exe文件:- set /p filename=<list.txt
- for /f "delims=" %%a in ('dir /b /s /a-d goto3\bbb.exe') do (
- ren "%%a" "%filename%.exe"
- echo,%%~dpa%filename%.exe
- )
复制代码
|