Script for FTP/SSH with winscp

I am looking to monitor an FTP site for files and automatically transfer them when files appear.  I use winscp as the client, and really if I can create a script of some sort that just runs at a certain time/times that would also work.  So at 5AM login to a site using winscp, copy all files from that site and then move them to a mapped drive, removing the files off of the winscp site.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Mark BullockQA EngineerCommented:
You can write scripts using  You can schedule a task in Windows to run every morning.

Scripting details are here. There's an example at the bottom of the page.
rhwimmersAuthor Commented:
Thanks.  After review I was given the wrong information.  A file will appear on a windows network (mapped drive or unc path) sometime in the middle of the night.  I just need to open up a connection and move (not copy) *.* from the mapped drive and put on the ssh server.  Is this still something I could use winscp for or is there a better way that you can think of?
Mark BullockQA EngineerCommented:
If your problem is simple you can do it with a single winscp command and then a delete command if the winscp command succeeds. Here's an example of a winscp command to copy a file.

If it's more complicated, here's some information about the exact same problem you want to solve. They suggest .NET. I think you could also write a powershell and probably even a .bat script.

Another option is to use cygwin (bash shell which runs on Windows) with its openssh package to get the scp command. Then you can write a simple bash shell script to copy the files. You can schedule a cygwin command in the Windows task scheduler.

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
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
SSH / Telnet Software

From novice to tech pro — start learning today.