Active Entries
- 1: Advent, day 5
- 2: Today's programming silliness
- 3: The highly inaccurate guide to the Eurovision Song Contest 2022 results!
- 4: Bang!
- 5: How not to get people to use a new feature
- 6: Misty creek and eerie fog
- 7: Remember...
- 8: Brexit means arrows?
- 9: boggyb's highly inaccurate guide to Eurovision: Shine a Light 2
- 10: Brighton again
Style Credit
- Style: Neutral Good for Practicality by
Expand Cut Tags
No cut tags
no subject
Date: 2007-08-14 11:08 am (UTC)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.