Created
December 28, 2019 15:31
-
-
Save trfiladelfo/cc297c618ba13d3c6f528b75e7d16192 to your computer and use it in GitHub Desktop.
List all file (.mp3) in directory
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
path = "/Users/user/Music/" | |
files = [os.path.join(r, file) for r, d, f in os.walk(path) | |
for file in f if '.mp3' in file] | |
files.sort() | |
print(files) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment