Forums
This topic is locked
notification if file changes
Posted 15 Jun 2009 03:57:01
1
has voted
15 Jun 2009 03:57:01 lou castro posted:
I want to be notified if a file has been updated. I have a database driven website that shows an image for each department. The image gets updated weekly, or biweekly, but the file name remains the same. How can I be notified when the file changes?Hopefully, someone has an idea....Thanks
Replies
Replied 25 Jun 2009 10:32:23
25 Jun 2009 10:32:23 Patrick Julicher replied:
Hi Lou,
Is the image filename stored in a database? How is the image updated? Through a CMS? Using a database Update? Is it being put in a folder directly?
Kind regards, Patrick
Is the image filename stored in a database? How is the image updated? Through a CMS? Using a database Update? Is it being put in a folder directly?
Kind regards, Patrick
Replied 28 Jun 2009 05:41:46
28 Jun 2009 05:41:46 lou castro replied:
hi patrick,
thanks for your interest.
Heres how it works...the asp page shows an image, which is actually a standing sheet for a bowling league, we'll call it league1.jpg. the database already has this file name. Every week , the new standing sheet changes, and it gets FTPed to the server. The image overwrites the old one, since it has the same name, so the most recent standing sheet is visible.
The only way I know the image has been updated, is to go and look at it. I want to be notified when file gets updated, so I can let everyone know the new standing sheet is available,
it sounds confusing, but only cause i cant explain it right.
thanks for your interest.
Heres how it works...the asp page shows an image, which is actually a standing sheet for a bowling league, we'll call it league1.jpg. the database already has this file name. Every week , the new standing sheet changes, and it gets FTPed to the server. The image overwrites the old one, since it has the same name, so the most recent standing sheet is visible.
The only way I know the image has been updated, is to go and look at it. I want to be notified when file gets updated, so I can let everyone know the new standing sheet is available,
it sounds confusing, but only cause i cant explain it right.
Replied 29 Jun 2009 17:47:40
29 Jun 2009 17:47:40 Patrick Julicher replied:
Hi Lou,
Your explanation made perfect sense. Unfortunately I don't know a way to check for an updated file.
The way I would solve this, is to have the file uploaded through a restricted page. On this page I would put a mail script, that sends an e-mail to the specified adress when an upload has been performed.
Hope this helps in any way?
Kind regards, Patrick
Your explanation made perfect sense. Unfortunately I don't know a way to check for an updated file.
The way I would solve this, is to have the file uploaded through a restricted page. On this page I would put a mail script, that sends an e-mail to the specified adress when an upload has been performed.
Hope this helps in any way?
Kind regards, Patrick
Replied 06 Aug 2009 15:42:26
06 Aug 2009 15:42:26 Owen Eastwick replied:
Hi Lou,
You could use FSO (File System Object) to ascertain when the file was created, modified etc., you can pretty much find out the same information about a file as you can with windows explorer.
Take a look here where you can find a complete explanation of FSO: www.w3schools.com/asp/met_getfile.asp.
The next problem is how to run the FSO routine on schedule, and for that, you might want to take a look at this article: www.asp101.com/articles/john/schedule/default.asp
You could use FSO (File System Object) to ascertain when the file was created, modified etc., you can pretty much find out the same information about a file as you can with windows explorer.
Take a look here where you can find a complete explanation of FSO: www.w3schools.com/asp/met_getfile.asp.
The next problem is how to run the FSO routine on schedule, and for that, you might want to take a look at this article: www.asp101.com/articles/john/schedule/default.asp