Date: 2007-08-14 11:08 am (UTC)
torkell: (Default)
From: [personal profile] torkell
Nah, I just added IF NOT !foo:~0^,1!==K (...) to the mess.

The full command was:
@for /d %I in (????) do @for /d %J in (%I\??) DO @for %K in (%J\*.jpg) do @(set foo=%~nK&& if not !foo:~0^,1!==K ( ( if !foo:~4^,2!==10 ( set bar=A) else ( if !foo:~4^,2!==11 ( set bar=B) else ( if !foo:~4^,2!==12 ( set bar=C) else ( set bar=!foo:~5,1!) ) ) ) && echo %K K!bar!!foo:~6,2!!foo:~20,4!.JPG && ren %K K!bar!!foo:~6,2!!foo:~20,4!.JPG ) )
It was used for bulk renaminmg of photos, as the default naming format from Kodak's software is pretty useless. I'd used exiftool previously to shift the metadata into the filename, but wanted to do some more formatting.

On a related note, do you know of a win32 touch equivalent that actually sets the creation datetime? All I've seen only handles modification datetime, and sometimes access datetime.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 8th, 2026 10:37 pm
Powered by Dreamwidth Studios