Able to copy from IDE, but "Can't open data connection" from the command line.
Hi,
We're using WinSCP 5.11.3, build 7995
We have an FTP site e.g.
ourftpsite.ouragency.com, port 21
and we can send files to the /home/ folder via the ide.
But we're not able to use a batch file to send it.
Our batch file, OUR_Weekly.CMD, is
OUR_Weekly.txt is
, and the errors are
We're using WinSCP 5.11.3, build 7995
We have an FTP site e.g.
ourftpsite.ouragency.com, port 21
and we can send files to the /home/ folder via the ide.
But we're not able to use a batch file to send it.
Our batch file, OUR_Weekly.CMD, is
@ECHO OFF CD "C:\scripts" winscp.com /script=OUR_Weekly.txt /log="C:\LOGS\OUR_WEEKLY.LOG" /loglevel=0* exit
open ftp://OurUser:OurPassword@ourftpsite.ouragency.com/ put D:\inetpub\FTPROOT\apps\ourweekly\ourweekly.zip /home/ exit
. 2021-04-13 16:46:47.942 Starting upload of D:\inetpub\FTPROOT\apps\ourweekly\ourweekly.zip > 2021-04-13 16:46:47.942 CWD /home < 2021-04-13 16:46:47.957 250 CWD successful. "/home" is current directory. > 2021-04-13 16:46:47.957 PWD < 2021-04-13 16:46:48.004 257 "/home" is current directory. > 2021-04-13 16:46:48.004 TYPE I < 2021-04-13 16:46:48.035 200 Type set to I > 2021-04-13 16:46:48.035 PASV < 2021-04-13 16:46:48.067 227 Entering Passive Mode (64,128,232,111,199,137) > 2021-04-13 16:46:48.067 STOR ourweekly.zip . 2021-04-13 16:46:48.067 Connecting to 64.128.232.111:51081 ... < 2021-04-13 16:46:58.971 425 Can't open data connection for transfer of "/home/ourweekly.zip" . 2021-04-13 16:46:58.971 Copying files to remote side failed. * 2021-04-13 16:46:58.971 (ExtException) **Copying files to remote side failed.** * 2021-04-13 16:46:58.971 Can't open data connection for transfer of "/home/ourweekly.zip" . 2021-04-13 16:46:58.971 Asking user: . 2021-04-13 16:46:58.971 Error transferring file 'D:\inetpub\FTPROOT\apps\ourweekly\ourweekly.zip'. ("Copying files to remote side failed.","Can't open data connection for transfer of ""/home/ourweekly.zip""") < 2021-04-13 16:46:58.971 Script: Error transferring file 'D:\inetpub\FTPROOT\apps\ourweekly\ourweekly.zip'. < 2021-04-13 16:46:58.971 Script: Copying files to remote side failed. < 2021-04-13 16:46:58.971 Can't open data connection for transfer of "/home/ourweekly.zip" * 2021-04-13 16:46:58.971 (EScpSkipFile) Error transferring file 'D:\inetpub\FTPROOT\apps\ourweekly\ourweekly.zip'. * 2021-04-13 16:46:58.971 Copying files to remote side failed. * 2021-04-13 16:46:58.971 Can't open data connection for transfer of "/home/ourweekly.zip" . 2021-04-13 16:46:58.971 Copying finished: Transferred: 0, Elapsed: 0:00:11, CPS: 0/s . 2021-04-13 16:46:58.971 Script: Failed . 2021-04-13 16:46:58.971 Script: Exit code: 1 . 2021-04-13 16:46:58.987 Disconnected from server