Skip to content

Instantly share code, notes, and snippets.

@trfiladelfo
Created December 28, 2019 15:31
Show Gist options
  • Save trfiladelfo/cc297c618ba13d3c6f528b75e7d16192 to your computer and use it in GitHub Desktop.
Save trfiladelfo/cc297c618ba13d3c6f528b75e7d16192 to your computer and use it in GitHub Desktop.
List all file (.mp3) in directory
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