本帖最后由 apang 于 2014-12-4 13:53 编辑
- @set @n=0;/* & echo off
- set J=cscript -nologo -e:jscript "%~0"
- for /f "tokens=1*delims=/" %%a in ('dir /b *.jpg ^| %J%') do (
- md "%%a" 2>nul
- move "%%b" "%%a\"
- )
- pause & exit/b & rem */
-
- s = WScript.StdIn.ReadAll().replace(/\r?\n/g, '\n');
- s = s.replace(/^(.+?)\d+(-\d+)?\.jpg$/img, '$1/$&');
- WScript.Echo(s.replace(/^[^/]+$/mg, ''))
复制代码
|