Skip to content

Instantly share code, notes, and snippets.

View cathalgarvey's full-sized avatar

Cathal Garvey cathalgarvey

View GitHub Profile
@cathalgarvey
cathalgarvey / countfiles
Last active December 10, 2015 22:38 — forked from anonymous/countfiles
A little script I wrote to perform a quick census on my music library, to help me identify which artists/albums contain the most mp3s/m4as. This was intended to help me replace my music library with oggs, but could be used for all sorts of other handy things, too.
#!/usr/bin/env python3
import os
from sys import argv
# Walk through folders recursively, list the full path and number of (extension) files found in each.
basefolder = os.path.expanduser(argv[1])
filetype = str(argv[2]).lower()
output = []