
November 3rd, 2009, 09:45 AM
|
 |
Moderator From Beyond
|
|
Join Date: Sep 2004
Location: Israel
|
|
Quote: | Originally Posted by munchiez Hi all, I was hoping for a bit of advice as I'm not sure how to go about scanning folders for new files.
I have a site where users can upload images via HTTP and FTP. The files are sent to the user's "uploads" directory for processing. At the moment the user clicks a "Scan new files" button which runs "scanfiles.asp" and any images in their upload directory are resized then moved into a different folder.
I'd really like to automate the scanning process but I'm a bit stuck on how to do this.
My thought at the moment is to create a .vbs file that is executed by the Task Scheduler every 10 seconds or so. The .vbs script would connect to the database to fetch the user list, then check each upload folder for new files and run the "scanfiles.asp" script if required.
My main concern is would this be a bit of a drain of server resources?
Any help or sugestions would be appreciated! | every 10 seconds will indeed be big drain.
I would go in different way: when user is logging in, run the scan on
his folder one time. this will ensure he's "up to date" and you can also
run the scan after the user uploads new images via the website.
|