Last post Aug 28, 2010 08:15 AM by atconway
Aug 25, 2010 02:00 AM|harishusharma|LINK
I want to develop a service (may be Web / WCF / Windows) to monitor a SFTP location for excel files. As soon as any excel file arrives, service should be able to move it to some location and initiate another process.
My queries are:
1. Can we monitor SFTP using services? If not, what are the other ways to monitor.
2. Which service (Web / WCF / Windows) should I use? What could be the challenges?
Any help is highly appreciated. Thanks
Aug 26, 2010 04:10 AM|mayevski|LINK
"Monitoring" SFTP is nothing but periodically requesting directory listing and comparing it to the previous copy. Then sending Rename / Move command via SFTP (or via SSH if the SFTP server doesn't support this command) to do this. It doesn't matter (from
SFTP point of view), which technology you will use for a service. WCF is not applicable, though, as you will need an SFTP client component to do SFTP job. You can see the
comparison of various SFTP clients for .NET here.
Aug 26, 2010 07:14 AM|harishusharma|LINK
Thanks for the reply Mayevski, got your point.
Rather now I decided to change the monitoring location, as I have got full access to physical location of SFTP.
Aug 28, 2010 08:15 AM|atconway|LINK
As soon as any excel file arrives, service should be able to move it to some location and initiate another process.
For future reference, when needing to do the above operation for a .NET process, you would use a
FileSystemWatcher object. It will monitor a given directory for new files, and fire a wired up event to do whatever manipulations to the file or other coding you need. Read the link below for more information: