The Little Guy Posted April 8, 2009 Share Posted April 8, 2009 I want to create a cron that will run every hour or so. The cron will do the following: - Glob a directory for a list of directories, then check to see if there is any new directories that are not already in the database. - Glob the previous group, for new directories in that directory, and again add to the database if there are new ones. - Finally it will Glob again within those directories for an new files and add them to the database if they are not already added. Here is my example file structure: + audio +---- Artist1 +-------- Album1 +------------ Song1.mp3 +------------ Song2.mp3 +------------ Song3.mp3 +-------- Album2 +------------ Song1.mp3 +------------ Song2.mp3 +------------ Song3.mp3 +---- Artist2 +-------- Album1 +------------ Song1.mp3 +------------ Song2.mp3 +------------ Song3.mp3 +-------- Album2 +------------ Song1.mp3 +------------ Song2.mp3 +------------ Song3.mp3 So my question (using the above structure). Will this process take a VERY long time to run if there are say 1000 Artist directories each with about 3-5 album directories? Link to comment https://forums.phpfreaks.com/topic/153100-cron-glob-1000-directories/ Share on other sites More sharing options...
hellonoko Posted April 8, 2009 Share Posted April 8, 2009 I use a glob that scans mp3 directories and sub directories and also checks the file modified time to sort them. I am only up in the maybe 500 mp3s area but it is very quick. Dunno if that gives you any idea. Link to comment https://forums.phpfreaks.com/topic/153100-cron-glob-1000-directories/#findComment-804239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.