Answers for "get modified datetime of file python"

1

python windows get file modified date

# note: test.txt can also be a file path
import os.path, time
print("Last modified: %s" % time.ctime(os.path.getmtime("test.txt")))
print("Created: %s" % time.ctime(os.path.getctime("test.txt")))
Posted by: Guest on March-22-2021

Code answers related to "get modified datetime of file python"

Python Answers by Framework

Browse Popular Code Answers by Language