How can I monitor an FTP site?

I would like to monitor an FTP site every 15 minutes, and then report back via email if there are any files which need to be downloaded.
Is there software which will allow me to do this?
If there are files to be downloaded, it simply needs to send out an email to a specific email address informing the recipient that files are ready to be downloaded.
This is in a Windows OS environment.
100questionsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_beeDirector of Information TechnologyCommented:
Is this an internal server or you connecting to an external hosted FTP?
0
100questionsAuthor Commented:
Connecting to an external hosted FTP site.
0
ste5anSenior DeveloperCommented:
You need to scan the entire FTP hierarchy and store it. Then after a rescan you can determine changes. E.g. your new files.

But: Not all FTP servers support this, cause some are hiding the time stamps. Others don't allow to travers folders.
0
MSSPs - Are you paying too much?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

KimputerCommented:
It's possible, the easiest way if only one fixed location needs to be checked. You could use VBScript with an FTP add on as described here: http://www.example-code.com/vbscript/ftp_listDirectory.asp
Modify it slightly at If (n > 0) Then (cdo mail out alert)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ste5anSenior DeveloperCommented:
btw, meant directory traversal, seems there is no verb for it.
0
RayCommented:
Try setup a job in Allway Sync to sync to a local drive.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> seems there is no verb for it

traverse
0
ste5anSenior DeveloperCommented:
hmm, then my online dictionary failed. Thanks.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
https://en.wiktionary.org/wiki/traverse

Noun shows first. Scroll down for verb.
0
100questionsAuthor Commented:
Ray, is allway sinc software?
0
RayCommented:
Allway Sync is a software and there's a free version available depends on your need.

If the ultimate goal is to notify the user to download the newer file, this might be the better way to go.

http://allwaysync.com/

http://allwaysync.com/license.html
0
100questionsAuthor Commented:
Ray, will this software notify someone when there is a file to download on the FTP site?
If yes, how does it notify someone, via email?
0
RayCommented:
I don't think so; they are setup to sync automatically.  

You have 2 options probably via vbscript/vb.net if you really want to notify someone
1.  Search for the latest changes on the local directory, the notify user
2.  Read the allwaysync log file and determine if new files/folders are created locally, then notify user
0
100questionsAuthor Commented:
@Kimputer - it seems that part of that script refers to a 30 day trial.  I'm unsure what that means.
0
KimputerCommented:
There's a free version which was written in the "old" way (and therefore free). See the free download link here: http://www.chilkatsoft.com/ftp-activex.asp (right under the orange post title).
If this concerns life or death situations, you should revert to the paid version of course. If it's not, just use the free version and see how reliable it behaves over a period of a month. If nothing weird pops up (like reporting incorrect files, connection issues while a real FTP client doesn't etc), continue to use it. If not, decide if you want to pay for it.
I still use the free version as of  today (in VB.net, vbscript should behave no differently).
0
100questionsAuthor Commented:
@Kimputer - Thanks again.  To clarify I can this VB crispt on call, but then I need to download a separate component which is either free or paid for?  If yes, where is that component placed etc.
0
KimputerCommented:
In the example it says:

set ftp = CreateObject("Chilkat_9_5_0.Ftp2")

'  Any string unlocks the component for the 1st 30-days.
success = ftp.UnlockComponent("Anything for 30-day trial")

Open in new window


The first SET FTP command, refers to a Chilkat component. It's slightly different for the free version, but the free version registers it with Windows (if you use the installer).

The Unlock command is NOT used in the free version.

So in essence for the free version:

find and DELETE:
success = ftp.UnlockComponent("Anything for 30-day trial")

find:
set ftp = CreateObject("Chilkat_9_5_0.Ftp2")
replace with:
set ftp = CreateObject("ChilkatFTP.ChilkatFTP")

find:
n = ftp.GetDirCount()
replace with:
n = ftp.NumFilesAndDirs

As you might notice, it gets both files and dirs, so it's best to monitor a folder where there shouldn't be any folder underneath.

Of course the code needs to be adjusted much more, but if you intend to follow through with this solution, just tell us the logic you need (check who or what, actions, etc etc), and we'll translate it to code.
0
100questionsAuthor Commented:
Thanks.  So to start should I just create a vbs script and then try to run it, or is there an installer of sorts?
0
KimputerCommented:
Download Free Chilkat FTP ActiveX, run installer.
You can now use the example VBSscript (with the corrections I made), then program different logic into it. Then run the vbscript.
0
ste5anSenior DeveloperCommented:
Just a comment: This FTP component will not solve the conceptual problem, that not all FTP servers provide the necessary information about directory changes.. In those cases you need to download the files, create a hash and store it. Lather, rinse, repeat. Compare the hashes.
0
KimputerCommented:
Yes, I already made the assumption it would always be an empty folder, and report back when a file was dropped there.
If that was a wrong assumption, more programming logic needs to be added (either hash, or control file).
0
100questionsAuthor Commented:
This might work, unsure since I have not tested it at this time.   Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.