Is there a way to get the date a file or folder was last modified into python?
mahela007
6
Posting Whiz in Training
Recommended Answers
Jump to PostThere certainly is a way!
import os path = "path here" seconds = os.path.getmtime(path) print time.strftime('%Y-%m-%d %H:%M', time.localtime(seconds) #it will output the time last modified!
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.