Jump to content

Cron Glob() 1000+ directories


The Little Guy

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.