Topic "copy and remove files to two ftp servers"

Author Message
[View user's profile]

Joined: 2012-10-23
Posts: 2
Location: Romania
I'm trying to use a script that copy a csv files to an ftp server then move the same files to other ftp server.
Main problem is that log file generated by command contain only info about first connection and about second connection log file (with the same name) is located in lcd command path.
How can I solve this issue (having one log file for both connections)?

Ex(batch file)
@echo off
path=c:\;c:\windows;c:\windows\system32;C:\Program Files\WinSCP
IF EXIST daily_d.log DEL daily_d.log /console /script=taskD.txt /log=daily_d.log

Ex (script tasD.txt)
# Automatically abort script on errors
option batch continue
# Disable overwrite confirmations that conflict with the previous
option confirm off
open x
lcd c:\prognoza\outgoing
put *.csv /prognoza_nou/
open y
lcd c:\prognoza\outgoing
put -delete *.csv /
# Disconnect
# Exit WinSCP
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26858
Location: Prague, Czechia
Use full path to a log file.
Martin Prikryl
[View user's profile]

Joined: 2012-10-23
Posts: 2
Location: Romania
I already split in two scripts the transfer to ftp servers. Thanks for your reply.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License