python windows get file modified date

Solutions on MaxInterview for python windows get file modified date by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "python windows get file modified date"
Ayana
08 Oct 2020
1# note: test.txt can also be a file path
2import os.path, time
3print("Last modified: %s" % time.ctime(os.path.getmtime("test.txt")))
4print("Created: %s" % time.ctime(os.path.getctime("test.txt")))