本帖最后由 pcl_test 于 2016-11-2 20:07 编辑
- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /ad/b *-*') do (
- set "fn=%%a"
- rem ren "%%a" "!fn:*-=!"
- ren "%%a" "!fn:abc-=!"
- )
- pause
复制代码
- @echo off
- for /d %%a in (*-*) do (
- for /f "tokens=1* delims=-" %%b in ("%%a") do ren "%%a" "%%c"
- )
- pause
复制代码
|