Skip to content

Instantly share code, notes, and snippets.

@thurask
Last active September 20, 2017 00:13
Show Gist options
  • Save thurask/b737bc55951d5c947e6464c686dedc9b to your computer and use it in GitHub Desktop.
Save thurask/b737bc55951d5c947e6464c686dedc9b to your computer and use it in GitHub Desktop.
from __future__ import print_function
import os
#Run this in the root of your music dir!
def list_em():
artists = [x for x in os.listdir(os.getcwd()) if os.path.isdir(x)]
for artist in artists:
albums = os.listdir(artist)
for album in albums:
tracks = os.listdir(os.path.join(artist, album))
for track in tracks:
print(os.path.join(artist, album, track))
if __name__ == "__main__":
list_em()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment