- This topic has 2 replies, 2 voices, and was last updated 2 weeks, 4 days ago by
January 5, 2020 at 12:48 pm #196394ParticipantTopics: 1Replies: 1Points: 14Rank: Member
I plugged an iPhone into the USB port of my Windows 10 laptop and copied 300+ files into directory "Foo" on my hard drive. I did this with Windows Explorer CopyAll and Paste. The list view of "Foo" shows the actual creation date of each .JPG file (some going back 6 years).
But nothing I've tried in either PowerShell or the old CMD window lets me see these same creation dates. All the things I've tried show more recent dates (e.g. date of last access, date the files were copied into "Foo" from the iPhone, etc.).
In Windows Explorer, I see the file info under headings
Name Date Type Size
A typical line reads
TPLU8319.JPG 2/9/2014 JPEG image 1,133 KB
Clearly the creation date (e.g. 2/9/2014) resides somewhere on my hard drive, but I don't see a way to get these dates into text strings that I can manipulate in a script, etc.
I'd appreciate any advice/suggestions. Thanks in advance. Tom
January 5, 2020 at 2:03 pm #196508ParticipantTopics: 2Replies: 1693Points: 3,368Rank: Community Hero
Clearly the creation date (e.g. 2/9/2014) resides somewhere on my hard drive,
Hmmm ... yes and no. 😉 Digital images have meta data contained in the code in the files and if it's a common or well known format your Windows knows how to extract some of this meta data. That's what you see in the Explorer. Powershell is not able to read those meta data from images out of the box. You will have to find a module what adds this ability or write something by yourself.
Regardless of that: When you post code please format it as code. That's valid for error messages or example data as well.
Thanks in advance
January 5, 2020 at 10:16 pm #196565ParticipantTopics: 1Replies: 1Points: 14Rank: Member
Thank you Olaf. I assumed (incorrectly) that Windows Explorer was displaying a date that was associated with each file, rather than a date within the files themselves. Since I have NTFS, I was thinking I could get the dates I want from the Master File Table — but I can't.
The solution to my problem is to use a utility that extracts the date on which each photograph was taken (and other information) from JPG file headers. The free "jhead" utility does this. See https://www.sentex.ca/~mwandel/jhead/
Thanks again — Tom
- You must be logged in to reply to this topic.