Created
October 4, 2022 08:50
-
-
Save cobanov/d879ffe3981a36079333d6da92c8bec3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/usr/bin/python | |
import os | |
import shutil | |
folder_path = "/Users/cobanov/Downloads/audio_files/" | |
dst_folder = "destionat_path" | |
extension = (".mp3", ".mp4") # has to be tuple | |
for root, dirs, files in os.walk(folder_path, topdown=False): | |
for name in files: | |
if name.endswith(extension): | |
src = os.path.join(root, name) | |
dst = os.path.join(dst_folder, name) | |
# print(src) | |
# shutil.copyfile(src, dst) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment