Main Area and Open Discussion > General Software Discussion
Problem Solved. (batch change of jpg 'created time')
Curt:
When I moved my files to this computer (x64 Windows 10 Home), I accidentally & unfortunately used a program that has erased almost all original info and changed every jpg "Created Time". This is sad to me, because no matter how trigger happy I might be, I did not shoot 2150 pictures within a couple of minutes!
I realize I cannot recreate the original info or saved / created time, but I know I can copy each picture's "Last write"-time to also become its "Created"-time - and such a compromise is very okay in the situation (I don't care about camera info in general, other than when & where was the picture taken?) However, for now I can only do this one picture at a time - if I try to do it with more files, they have so far copied the same "time", or caused other problems. I need help to do this the proper batch way!
Problem Solved. (batch change of jpg 'created time')
Do 'you' know of a program that can do this? Or can & will 'you' write a script to make it happen?
AbteriX:
For Each JPG in folder --- Set "Created"-time from "Last write"-time
You can use PowerShell for that.
(First have a backup)
I will do it step by step for the learning effect:
Step1
Launch PoSh and change to your folder.
Step2
List the file(s) with Get-ChildItem and utilize Get-Member to see the object properties
(I have added select -First 1| because it is enough to see that info once only)
Get-ChildItem *.jpg | select -First 1 | Get-Member
(Short: ls *.jpg|gm)
You will see among others
CreationTime Property datetime CreationTime {get;set;}
LastAccessTime Property datetime LastAccessTime {get;set;}
LastWriteTime Property datetime LastWriteTime {get;set;}
Step3
Now lets see what that properties will get us
Get-ChildItem *.jpg | ForEach-Object{$_.CreationTime ; $_.LastWriteTime}
Donnerstag, 20. April 2017 16:25:27
Mittwoch, 19. Oktober 2005 01:18:56
Step4
Set Creation time from LastWriteTime
Get-ChildItem *.jpg | ForEach-Object{$_.CreationTime = $_.LastWriteTime}
Step5
Test, like in Step3
Get-ChildItem *.jpg | ForEach-Object{$_.CreationTime ; $_.LastWriteTime}
Mittwoch, 19. Oktober 2005 01:18:56
Mittwoch, 19. Oktober 2005 01:18:56
For you it's enough to perform Step4.
In short syntax:
dir *.jpg | %{$_.CreationTime = $_.LastWriteTime}
Or work on the first few only for testing purpose:
dir *.jpg |select -First 3| %{$_.CreationTime = $_.LastWriteTime}
Use '-Recurse' to work in sub folders too:
dir *.jpg -Recurse | %{$_.CreationTime = $_.LastWriteTime}
HTH? :D
GCI is short for 'Get-ChildItem'
DIR and LS are aliases for 'Get-ChildItem'
.
Curt:
1) I have never before seen Power Shell or Power Shell ISE. So no matter how grateful I might be that you're trying to help me, AbteriX, I have absolutely no idea what you just told me! :-[
2) Power Shell will not navigate to C:\Users\Kurt\Pictures, but will strictly open at C:\Users\Kurt and go nowhere else. Any attempt to navigate elsewhere has so far resulted in "ObjectNotFound" & "CommandNotFoundException" or similar. So, back to basics: How do I navigate Power Shell? :tellme:
tomos:
Curt, [edit] see also next post [/edit] this old but might be of help -- I have used another app and posted about it here but could not find it :-(
revisiting this (correcting created date of photos) -
this about correcting the date in the Exif info if that incorrect.
From the current newsletter (Nov.6th 2009) from Imaging Resource. I added a link for the recommended app in the quote:-
camera manufacturers record it in the Exif header of their image files in several places. The DateTimeOriginal, CreateDate and ModifyDate tags all record it, for example. The trick is to reset all three on a new image.
ExifTool can do that with one simple command. There's a Windows version and a Mac version. The simplest way to use the utility is from the command line (Terminal on the Mac).
[...]
exiftool -AllDates-=1 *
--- End quote ---
Full article: http://www.imaging-resource.com/IRNEWS/archive/v11/20091106.htm#adv
-tomos (November 07, 2009, 09:54 AM)
--- End quote ---
I do have a GUI (portable) for that:
the only info in the about box is:
---------------------------
Information
---------------------------
ExifToolGUI v3.42 by Bogdan Hrastnik
Freeware interface for Exiftool
ExifTool by Phil Harvey v8.35
jhead.exe=missing, jpegtran.exe=missing
---------------------------
tomos:
this the one I used for the job: again old, but might still do the job:
here are two more tools that will be useful in this task.
• http://www.sentex.net/~mwandel/jhead/
• http://jpgtime.learsy.com/
-lanux128 (January 19, 2008, 12:30 PM)
--- End quote ---
that Learsy one is a thing of beauty :Thmbsup:
# no install
# simple to use -
* select files (all if you want) / click Set time from EXIF - it show the Exif time in the "New Time" column
* compare
* select those you want to change
* click Apply changes
then go off and donate to the author (donationware :up:)
http://www.muralpix.com/donation.html
-tomos (January 19, 2008, 01:08 PM)
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version