Created
November 10, 2017 02:57
-
-
Save standage/1ee44acdfe7bc9682361dea8fa2b4309 to your computer and use it in GitHub Desktop.
This file contains 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/env python | |
from __future__ import print_function | |
import glob | |
import os | |
m4a_files = glob.glob('*/*/*.m4a') | |
mp3_files = glob.glob('*/*/*.mp3') | |
to_delete = list() | |
for m4a in m4a_files: | |
test = m4a.replace('.m4a', '.mp3') | |
if test in mp3_files: | |
to_delete.append(m4a) | |
for m4a in to_delete: | |
# print(m4a) | |
os.unlink(m4a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment