- @echo off&setlocal enabledelayedexpansion
- for %%a in (January.401 February.402 March.403 April.404 May.405 June.406 July.407 Aguest.408 September.409 October.410 November.411 September.412 1st.601 2nd.602 3rd.603 4th.604 5th.605 6th.606 7th.607 8ht.608 9th.609 10th.610 11th.611 12th.612 13th.613 14th.614 15th.615 16th.616 17th.617 18th.618 19th.619 20th.620 21st.621 22nd.622 23rd.623 24th.624 25th.625 26th.626 27th.627 28th.628 29th.629 30th.630 31st.631 Morning.801 Noon.802 Evening.803 Midnight.804) do set %%~xa=%%~na
-
- for /f "delims=" %%a in ('dir /a-d/b "*.jpg"') do (
- set n=%%~na
- for /f "tokens=1-3" %%1 in (".4!n:~4,2! .6!n:~6,2! .8!n:~8,2!") do (
- ren "%%a" "!n:~,4! !%%1! !%%2! !%%3!%%~xa"
- )
- )
复制代码
[ 本帖最后由 tireless 于 2009-3-29 17:53 编辑 ] |