Created
December 1, 2017 20:05
-
-
Save csabatini/fb3cc3c6187d9b3141dc84b341f375af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from datetime import datetime | |
directory = './test' | |
for filename in os.listdir(directory): | |
filepath = directory + '/' + filename | |
filestats = os.stat(filepath) | |
print '{} - {} - {} - {}'.format( | |
filepath, filestats.st_size, datetime.fromtimestamp(os.path.getctime(filepath)), datetime.fromtimestamp(os.path.getmtime(filepath)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment