Change file name on destination

Advertisement

Wiwa
Joined:
Posts:
6

Change file name on destination

How can I change file name on destination.
On my server is test.xml (and must stay test.xml) and I would to change to ABC.xml (but only on destination FTP server)

Example.jpg

Reply with quote

Advertisement

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

Re: Change file name on destination

You cannot change the file name with keepuptodate command.

You would have to use a plain put and handle the monitoring of local file changes on your own. But then it would be better to use WinSCP .NET assembly (and it's Session.PutFiles) combined with some scripting language (e.g. a PowerShell).
https://winscp.net/eng/docs/library_powershell

Here is an example that does this, just with an opposite synchronization:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date

Though for local to remote direction, better than polling is to use local file system notifications.

Reply with quote

Advertisement

You can post new topics in this forum