Sending only modified files via FTP on port 121

Advertisement

molecule
Joined:
Posts:
2
Location:
HKG

Sending only modified files via FTP on port 121

Hi all,

I am completely new to this software and scripting so please bear with me.
I would like to create a batch file to launch winscp and send only the most recent modified file in a local directory on our server and send it via FTP to a remote party.
The remote party has indicated that they have opened port 121 for a "more secure" communications channel.
In winscp, I have tried to create a session connecting to the IP on port 121 and selected FTP with SSL/TSL but this always gets rejected with error "error is SSL read server helloA". I believe this means the remote server is disconnecting the session. I am pretty sure that the first time i tried this setting, I actually received a pop up about accepting a certificate. But I know no longer get that message. Does this mean I am connecting incorrectly? Is there a way to delete the certificate and re-test. Previously I believe I was able to connect but was not able to transfer any files and there was a permission error. The only way I can do this is to use the normal FTP on port 21 with no encryption but obviously this is not what I want.

Secondly, since I want this to be automated, I will need to use a batch file with a CLI command for winscp. How do I write a line to only transfer the most recently modified file to the remote party. The folder contains several files but i only want it to transfer the most recently modified one. Can someone please assist?

Lastly, it would be great to receive an email notification once that file is successfully transferred. Is this at all possible from winscp?

Any assistance is GREATLY appreciated.

Thanks all

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Sending only modified files via FTP on port 121

molecule wrote:

Is there a way to delete the certificate and re-test.
You can delete them from registry under HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2.
But I doubt it helps.

Secondly, since I want this to be automated, I will need to use a batch file with a CLI command for winscp. How do I write a line to only transfer the most recently modified file to the remote party. The folder contains several files but i only want it to transfer the most recently modified one. Can someone please assist?
Would synchronization be an option?

Lastly, it would be great to receive an email notification once that file is successfully transferred. Is this at all possible from winscp?
Please read documentation. If that does not help, come back.

Edit 2021: A full example, including a script to send the email:
https://winscp.net/eng/docs/script_email

Reply with quote

Advertisement

You can post new topics in this forum