- @echo off & setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /b /s *.jpg') do (
- set "s=%%a"
- for /f "delims=" %%b in ("!s:-=/!") do echo,Ren "!s!" "%%~nxb"
- )
- pause
复制代码
- @set @n=0;/* & echo off
- for /f "delims=" %%a in ('dir /b /s *.jpg^|cscript -nologo -e:jscript "%~0"') do (
- echo,Ren "%%a"
- )
- pause & exit/b & rem */
-
- s = WScript.StdIn.ReadAll();
- re = /.*-(\d+\.jpg$)/img;
- while((ar = re.exec(s)) != null) {WScript.Echo(ar[0] + '" "' + ar[1])}
复制代码
|