Aug-14-2020, 05:49 PM
(Aug-12-2020, 09:00 PM)bowlofred Wrote: Main thing for me, does theos.path.getctime()
value agree withdir /t:c
?
Here's what I get when I run
dir /t:c
:Here's what I see in explorer:
The dates in Explorer are the actual creation dates; The date and time the photo was taken (which is what I want).
So I've realized that I have 2 problems...
Please understand that I'm reeeeaally new to Python and programming in general. I'm probably setting this up wrong.
1) When I use
datetime.fromtimestamp()
, I get an error that I haven't loaded it yet. So, I guess my question is... where do I import that from?right now these are what I'm importing:
import os, datetime
from pathlib import Path
from time import ctime
2) When I use
os.path.getctime("IMG_7001.JPG)
, or str(datetime.fromtimestamp(os.path.getctime("IMG_7001.JPG")))
It returns a "FileNotFound" error.I think the issue is that I'm not setting up the "where" correctly. Meaning the path the files are located. I was gonna post what I have, but it's getting tangled (I'm throwing code at it to see what sticks) and I think I need to go back to some tutorials and start over.
- John