Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jltemple's full-sized avatar

Joshua Temple jltemple

View GitHub Profile
@jltemple
jltemple / folder_splitter.py
Last active December 15, 2015 21:59 — forked from zupo/folder_splitter.py
Split a folder with many files into subfolders with N files.Usage: python folder_splitter.py path/to/target/folder
# Modifying folder_splitter.py orginally made by Peter Lamut to move a files into a directory tree based on their last 4 characters
# Similar problem and solves this issue: http://serverfault.com/questions/95444/storing-a-million-images-in-the-filesystem
# EBES06281R0.xml will be moved to /81/r0/EBES06281R0.xml
#
# Original: https://gist.github.com/zupo/5849843
import argparse
import os
import shutil