Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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


WinSCP - scripts to open connection and copy files

We have a small problem that we need a solution for :-

We are trying to copy files from a non SFTP Windows server to an SFTP server using Winscp.
We need to create a batch that can open the session and keep it active for atleast 8 hours and keep copying files on regular basis or sync them.
In order to do that we thought the best approach would be to create a batch to login to SFTP server and keep the server active and at the same time create another batch to keep copying the files on loop.

Appreciate your support and best recommendations with the above logic. We have created some scripts to open the session and copy the files as below.
Login to session
option batch off
option confirm off
open sftp://testuser01:P@ssw0rd@hostname
Copy the Files
option batch off
option confirm off
open sftp://testuser01:P@ssw0rd@hostname/
cd Swifttest/paymentsafe/PS_TO_SAA
put "D:\paymentsafe_bbyn\localFolder\From_PS_To_SAA\*.out"
put "D:\paymentsafe_bbyn\localFolder\From_PS_To_SAA\*.txt"
# Disconnect