I need to rename all pictures in a folder by adding the very first creation date and time.
I found several examples that allow me to add the creation date, last write date, etc. But I need the date and time the pictures was actually shot, that is the value you can normally see in the "Date" column in windows explorer, that is the column highlighted in the picture (sorry, Italian version of Windows):
The best code I found is the following:
Get-ChildItem -path "./" -recurse -include @("*.jpg") |
rename-item -newname { $_.name -replace "IMG",($_.CreationDate.toString("yyyyMMddHHmmss"))}
But this will add the creation date, that is the date and time I copied the files to a different folder. What I need instead, as said, is the date and time the pictures was actually shot.
Thanks in advance for your help