import os
import time
now = time.strftime("%Y-%m-%d")
home_path = os.path.expanduser('~')
base_path = os.path.join(home_path,"Downloads")
# base_path = "C:/Users/newstep/Downloads"
for filename in os.listdir(base_path):
c_time = time.gmtime(os.path.getctime(os.path.join(base_path, filename)))
creation_date = time.strftime("%Y-%m-%d",c_time)
if now == creation_date:
print(filename)
'컴퓨터 > Python' 카테고리의 다른 글
python selenium 크롬드라이버 설치없이 webdriver_manager로 자동설치, 버전 관리 (0) | 2023.12.27 |
---|---|
python 다른폴더에 파일 이동시킬 때 같은이름파일 있으면 같은파일지우고 새로운파일 이동 (0) | 2023.12.14 |
flask 액세스 권한에 의해 숨겨진 소켓에 액세스를 시도했습니다 (0) | 2023.12.07 |
셀레니움 콤보박스 모든 텍스트 가져오기 (0) | 2023.12.02 |
python pyside6 그림 이미지 순환 (0) | 2023.12.02 |