특정 폴더 내부 파일명 불러오기1 [import os] 파일 호출, 삭제, 생성 명령어. 1. 파일 경로 join을 활용한 호출.import ostest_path = './dataset/video'file_name = 'basketball_1'path= os.path.join(test_path, 'YouTubeClips', file_name) 2. 특정 path 삭제. -주의사항 : shutil.rmtree 는 path 하위 디렉토리의 모든것을 삭제함으로 주의 해야함.import osif os.path.exists(path): shutil.rmtree(path) 3. 폴더 생성. - os.makedirs 는 하위 디렉토리의 폴더까지 한번에 생성할 수 있음. ex) mkdir의(폴더 생성 명령어) 경우 path= './a/b' 를 하면 a폴더가 없다면 b를 생성.. 2024. 5. 26. 이전 1 다음