Batch editing photo dates
June 25, 2007 8:01 AM Subscribe
While on vacation, I bought a new camera but accidentally set the date to 2006, not 2007. I want to fix this, but keep still keep the dates in order. Is there a quick way to batch edit a large set of photos where I can simply roll the date forward a year instead of having to go in individually to change each date? I've found a mac program that does this, but have yet to find a windows one. Flickr has something similar, but you can only roll forward a couple of days.
I believe IrFanView will let you do this with EXIF data. If you need to change physical timestamps on files FileOps might work.
posted by ostranenie at 8:17 AM on June 25, 2007
posted by ostranenie at 8:17 AM on June 25, 2007
Hmm...actually those two solutions will have you changing the timestamp on every single file to one time. If you want to change just the year and leave the month/year/hour/minute/second alone, you could do that with a fairly simple VbScript (.vbs)
I'll check back and if no one has written in a decent solution (like something that already exists), I'll take this on.
If you have a Mac, maybe you might consider mounting the share on the PC as a drive and using the Mac program you found with network drive operation?
posted by ostranenie at 8:20 AM on June 25, 2007
I'll check back and if no one has written in a decent solution (like something that already exists), I'll take this on.
If you have a Mac, maybe you might consider mounting the share on the PC as a drive and using the Mac program you found with network drive operation?
posted by ostranenie at 8:20 AM on June 25, 2007
ah good catch... The original exiftool website basically gives you a script to do just that look here:
posted by stratastar at 8:28 AM on June 25, 2007
posted by stratastar at 8:28 AM on June 25, 2007
Response by poster: Thanks for the advice all. I actually don't have a mac or much skill as for as dos/perl/vbs etc. I'm looking for something (if it exists) that is very easy and straight forward. I's like to just change the year and keep the rest of the date the same. Thanks for the help!
posted by nyu2 at 8:31 AM on June 25, 2007
posted by nyu2 at 8:31 AM on June 25, 2007
jhead is what you need for EXIF manipulation...
From the Usage page:
-da<date>-<date>
To be used when fixing dates from cameras where the date was set incorrectly... The time offset is specified as a difference between two dates
Examples:
Year on camera was set to 2006 instead of 2007 for pictures taken in April
The command:
jhead -da2006:06:24-2007:06:24 Pictures\**\*.jpg
*shoudl* (i did not test it -- Try it on one file first!!!) reset the date +1yr on all jpg files recursively in all subfolders of the Pictures directory...
You can also add the option -ft to update the file timestamp to match the EXIF timestamp as well if you so require.
posted by nielm at 8:46 AM on June 25, 2007
From the Usage page:
-da<date>-<date>
To be used when fixing dates from cameras where the date was set incorrectly... The time offset is specified as a difference between two dates
Examples:
Year on camera was set to 2006 instead of 2007 for pictures taken in April
The command:
jhead -da2006:06:24-2007:06:24 Pictures\**\*.jpg
*shoudl* (i did not test it -- Try it on one file first!!!) reset the date +1yr on all jpg files recursively in all subfolders of the Pictures directory...
You can also add the option -ft to update the file timestamp to match the EXIF timestamp as well if you so require.
posted by nielm at 8:46 AM on June 25, 2007
This software claims to allow batch exif editing. Here's a screenshot
PS: I haven't tried it.
posted by special-k at 9:10 AM on June 25, 2007
PS: I haven't tried it.
posted by special-k at 9:10 AM on June 25, 2007
I'm not sure of any programs, but here is a VBScript to do the job. Open Notepad, paste in the code. Save the file as "Rename.vbs". Place your pictures (I suggest you copy them to the location rather then move them) in a folder named "C:\RenameFiles". Double click the script.
'=====BEGIN CODE=====
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\RenameFiles'} Where " _
& "ResultClass = CIM_DataFile")
Wscript.echo ("This script will rename files with the number 2006 to 2007.")
For Each objFile In FileList
If objFile.Extension = "jpg" Then
strFilename= replace(objfile.filename, "2006","2007")
strNewName = "C:\RenameFiles\" & strFilename & "." & "jpg"
errResult = objFile.Rename(strNewName)
end if
next
wscript.echo "Done!"
'=====END CODE=====
posted by TheDukeofLancaster at 9:21 AM on June 25, 2007
'=====BEGIN CODE=====
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\RenameFiles'} Where " _
& "ResultClass = CIM_DataFile")
Wscript.echo ("This script will rename files with the number 2006 to 2007.")
For Each objFile In FileList
If objFile.Extension = "jpg" Then
strFilename= replace(objfile.filename, "2006","2007")
strNewName = "C:\RenameFiles\" & strFilename & "." & "jpg"
errResult = objFile.Rename(strNewName)
end if
next
wscript.echo "Done!"
'=====END CODE=====
posted by TheDukeofLancaster at 9:21 AM on June 25, 2007
Note that TheDukeofLancaster's VB script only renames files; it doesn't appear to change any timestamps. If you happen to have a bunch of photos that have dates as their filenames, and you only care about the filename and not the timestamp, then the solution above will work. Anything involving timestamps, though, and you're better off with one of the other solutions (that jhead option looks neato!).
posted by chrominance at 11:49 AM on June 25, 2007
posted by chrominance at 11:49 AM on June 25, 2007
This thread is closed to new comments.
posted by stratastar at 8:13 AM on June 25, 2007