Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Auto-Transfer Files Every Minute Using a Persistent FTP Connection

You cannot implement a loop easily in a simple WinSCP scripting.

But you can use WinSCP .NET assembly from your favorite scripting language.
For example from PowerShell:

We have examples for upload, which you can modify according to your needs:

Auto-Transfer Files Every Minute Using a Persistent FTP Connection

I have a situation where I need to keep a persistent FTP session open to a remote server. Using that connection I need to have WinSCP auto-upload any PDF files found in a local directory to the FTP server. The connection has to be persistent because of the FTP server we're sending to. We have no control over that server and apparently it caches connections and blocks a sending server after three sessions have been opened. You would think that the remote server would drop a connection once the sending side completes it's task and disconnects but for some reason it does not. Therefore I need some option for keeping a connection open.

NOTE: I need the PDF files to be *MOVED* meaning they need to be deleted once successfully transferred.

Any thoughts?

Thanks in advance for your help!