교 향
Maximalism
교 향
전체 방문자
오늘
어제
  • 전체글
    • Coding
    • Linux
    • Docker
    • Python
    • AI
      • GPT
      • Pandas
      • Numpy
      • tensorflow
      • pytorch
      • openCV
      • Study
      • AIconnect - [GPT]한국어..
    • Data structure, OS
    • Competitions
    • Investment
    • Book
    • Health
    • Trip
    • Memo
    • 대학원

블로그 메뉴

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

공지사항

인기 글

태그

  • AI면접 #딥러닝면접 #인공지능면접 #기울기소실 #GradientVanishing
  • ActivationFunction #활성화함수 #인공지능면접

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
교 향

Maximalism

카테고리 없음

특정 폴더 안 디렉토리 순회

2023. 1. 10. 17:53

 

import os


def enum_folder_only(dirname):
    for filename in os.listdir(dirname):
        file_path = os.path.join(dirname,filename)
        if os.path.isdir(file_path):
            print(file_path)
            enum_folder_only(file_path)


enum_folder_only("순회할 폴더경로")

 

출처

https://m.blog.naver.com/monkey5255/221758850260

 

특정 폴더안의 디렉토리(파일x) 순회하기 (Getting a list of all subdirectories in a directory recursively)

특정 폴더 경로를 입력하면 그 안의 모든 폴더(맨 하위 폴더까지)를 순회하면서 출력해 줍니다. os.listdir...

blog.naver.com

 

    교 향
    교 향
    AI/ML/DL

    티스토리툴바