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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.