컴퓨터/Python

Python]파일의 수정 날짜 출력하기

예섬수진 2009. 10. 6. 15:05
import os
import time

filestat = os.stat('\\\\101.881.166.231\\Cruisecontrol\\Prevent\\Source\\cambr
ia.zip')

print time.strftime('%y.%m.%d', time.localtime(filestat.st_mtime))
# 접근한 날짜 : st_atime
# 수정한 날짜 : st_mtime
# 만든 날짜 : st_ctime

출력 결과 : 09.10.02