本帖最后由 buyiyang 于 2023-5-30 22:10 编辑
这个似乎是故意这么写的,我就不改了。
http://bcn.bathome.net/tool/pin.exe- @echo off
- for /f "delims=" %%i in ('dir /b /a-d') do (
- if not "%~nx0"=="%%~nxi" (
- for /f "delims=" %%a in ('powershell -c "('%%~nxi' -replace '^[^\u4e00-\u9fa5]*([\u4e00-\u9fa5]).*$','$1') -replace '[^\u4e00-\u9fa5]'" ^| pin -p -d3') do (
- echo,%%i------^>%%a%%~nxi
- ren "%%i" "%%a%%~nxi"
- )
- )
- )
- pause
复制代码
|