1、- @echo off & setlocal EnableDelayedExpansion
- for %%A in (%*) do (
- for /f "tokens=1,* delims=-" %%a in ("%%~nA") do (
- set "L=%%a" & set "R=%%b"
- ren %%A "!R:~1! - !L:~,-1!.mp3"
- )
- )
复制代码 2、- @echo off & setlocal EnableDelayedExpansion
- for %%A in (%*) do (
- set str=%%~nA
- for /f "delims=\ tokens=1,2" %%a in ("!str: - =\!") do (
- ren %%A "%%b - %%a.mp3"
- )
- )
复制代码
[ 本帖最后由 tireless 于 2008-12-18 08:05 编辑 ] |