
CODE: [Copy to clipboard][ Last edited by moniuming on 2009-11-30 at 23:05 ]@echo off
setlocal enabledelayedexpansion
for %%a in (*.txt) do (
set /p str=<"%%a"
for /f "tokens=2 delims=." %%i in ("!str!") do (
ren "%%a" "%%i.txt"
)
)
首先十分感谢,然后就是能不能再完善下功能就再完美不过了!具体为,现在对CODE: [Copy to clipboard]@echo off
setlocal enabledelayedexpansion
for %%a in (*.txt) do (
set /p str=<"%%a"
for /f "tokens=2 delims=.)" %%i in ("!str!") do (
ren "%%a" "%%i.txt"
)
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |