티스토리 뷰
import os.path, time
print("last modified: %s" % time.ctime(os.path.getmtime(file)))
print("created: %s" % time.ctime(os.path.getctime(file))
https://stackoverflow.com/questions/237079/how-to-get-file-creation-modification-date-times
How to get file creation & modification date/times?
I have a script that needs to do some stuff based on file creation & modification dates but has to run on Linux & Windows. What's the best cross-platform way to get file creation &
stackoverflow.com
yyyy-mm-dd hh:mm:ss 형식으로 받고 싶다면
def get_modified_time(file):
return datetime.fromtimestamp(os.path.getmtime(file)).strftime('%Y-%m-%d %H:%M:%S')
https://stackoverflow.com/questions/19501711/how-can-i-convert-os-path-getctime
How can I convert os.path.getctime()?
How can I convert os.path.getctime() to the right time? My source code is: import os print("My Path: "+os.getcwd()) print(os.listdir(".")) print("Root/: ",os.listdir...
stackoverflow.com
배포했던 패키지에 달린 아래의 이슈 때문에 해당 기능을 찾게 됐었음.
https://github.com/developer0hye/BatchedFFmpeg/issues/3
FR: keep the file creation date the same as the input file · Issue #3 · developer0hye/BatchedFFmpeg
I have a bunch of home videos in .avi and .mov format I want to all convert to mp4. However, trying a batch ffmpeg caused all the new .mp4 files to have the file creation date of today. Ideally I w...
github.com
'Python' 카테고리의 다른 글
| [Python] Numpy Batched IoU 코드 (0) | 2022.01.19 |
|---|---|
| PyPi 배포 스크립트 (0) | 2022.01.09 |
| Static member variable in Python (0) | 2021.12.29 |
| [Python] multiprocessing 실제 적용 사례 image-knocker (0) | 2021.09.08 |
| [Python] PyPI 배포하다가 겪은 문제들 (0) | 2021.08.13 |
- Total
- Today
- Yesterday
- 위상 정렬 알고리즘
- LCA
- 백준
- 백준 11053
- 자료구조
- 파이참
- C++ Deploy
- FairMOT
- 조합
- ㅂ
- MOT
- 단축키
- cosine
- 백준 1766
- 백준 11437
- 가장 긴 증가하는 부분 수열
- PyCharm
- 이분탐색
- Lowest Common Ancestor
- 백트래킹
- 순열
- 인공지능을 위한 선형대수
- 문제집
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
