0

I have a database of 250,000 tiny audio files that will grow to perhaps 500,000. I need to copy this to my Android phone's ext4-formatted internal storage.

I have discovered that some computers are unable to support such a large number of files in a single directory.

Will an Android 5.1 phone prevent me from moving 500,000 files to a single directory? If it permits this number of files, will it experience a slowdown in reading the files if they are all placed in one directory as opposed to distributing them numbered directories?

  • Internal storage or SD card? Your main problem here is going to be the file system, for example, FAT32 only allows 65,535 files in a single directory whereas ext4 has unlimited number of files per directory (as long as it's under the maximum, about 4.3B files per volume). Having 500k files in a folder is just bad practice, organization would be impossible without a folder hierachy of somekind. – acejavelin Jan 28 '17 at 15:10
  • On the internal storage. Is there any way to determine what type of file system is used on the internal storage? I cannot connect gparted via MTP to inspect it. – Village Jan 28 '17 at 15:11
  • This will tell you the file system type: play.google.com/store/apps/details?id=me.kuder.diskinfo – acejavelin Jan 28 '17 at 15:13
  • I have the files numbered carefully, so they are just as easy to manage inside folders as out. I can just use cp nn_*.mp3 outdir/ where nn is a prefix for all of the files that belong to a particular group. That is just as simple as cp nn/*.mp3 outdir/. – Village Jan 28 '17 at 15:13
  • 1
    @beeshyams I saw this one too.. and this was answered from a ftp or webserver perspective, something far more robust in this regard for file access than an Android phone. Although I can't prove or quantify it, which is why I didn't give a real answer, I believe that having 250k files in a single directory on Android could result in serious performance issues. They notes on a server it could increase access times by seconds, on an Android device it would likely be many times more of an issue... But like I said, I don't have no way to prove this theory. – acejavelin Jan 29 '17 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.