Python Forum

Full Version: Filesystem folder size sort
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I have a large number of videos in a large number of folders on a 4TB removable hard drive. I want to backup this 4TB to 4x1TB drives. The problem is the folders are different sizes so I can't neatly split them.

I looking to construct a script to list the folder sizes on the 4TB drive and sort them into blocks of 1TB.

I've found many scripts that list file sizes and folder sizes, but what I'm struggling with is what data structure to go for to be able to do the sort task.

I've considered taking the folder data into a spreadsheet and manually splitting the files, but this seems clumsy. There must be an elegant programming solution, but I'm not sure what I'm looking for.

Could you please point me in the direction of some similar example scripts I can play with.

Kind regards,

Reggie.