Answer the question
In order to leave comments, you need to log in
How to split a million files?
Good morning.
Such a problem has arisen ... There is a folder with a volume of a million files on the external drive, which is very difficult to open and wait for the entire list to be loaded.
How can this folder be split into smaller directories of 1000 files each? If this is not the case for Windows, perhaps there are options for Linux or Mac? I can connect this drive to any of the systems.
Thanks :)
Answer the question
In order to leave comments, you need to log in
www.cyberforum.ru/cmd-bat/thread630948.html
but easier in Python using glob
gis.stackexchange.com/questions/141107/using-folde...
How to split Folder into multiple subfolders ?
let fileCount=3000 let dirNum=1 for f in * do [ -d $f ] && continue [ $fileCount -eq 3000 ] && { dir=$(printf "%03d" $dirNum) mkdir $dir let dirNum=$dirNum+1 let fileCount=0 } mv $f $dir let fileCount=$fileCount+1 done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question