- /*&cls
- @echo off
- for /f "delims=" %%a in ('dir /b *.jpg *.png^|cscript -nologo -e:jscript "%~f0"') do (
- ren %%a
- )
- pause&exit
- */
- var i=0,files = WScript.StdIn;
- s='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- while (!files.AtEndOfStream) {
- f=files.ReadLine().toUpperCase()
- ff=f.replace(/^.+\./,'')
- WSH.echo('"'+f+'" '+s.substr(i++,1)+'.'+ff)
- }
复制代码 回复 3# Monkey |