Copying files from remote side failed.

Advertisement

kevin_bullen
Joined:
Posts:
2
Location:
Michigan

Copying files from remote side failed.

I'm trying to automate a download by calling WinSCP from a .NET executable. I can connect to the server, change directories and start the file get but I always get an error "Copying files from remote side failed."

If I run WinSCP and download the file manually, it works fine, so it's something with the script. I've tried changing the mode to bin, ascii, automatic with no luck.

Anyone have any ideas?

My call in the .net program looks like this:

Dim startInfo As New ProcessStartInfo("C:\Program Files\WinSCP\WinSCP.com", "/script=MyScript.txt /log=winscp.log")

Process.Start(startInfo)

The script (MyScript.txt), looks like this:

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch off
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open ftp://password:user@ftp1.ftpsite.com
# Change remote directory
cd titleswk
# Force binary mode transfer
option transfer automatic
# Download file
get ecpacat.txt c:\
# Disconnect
close
# Exit WinSCP
exit


log:
. 2009-02-28 10:29:20.453 --------------------------------------------------------------------------
. 2009-02-28 10:29:20.453 WinSCP Version 4.1.8 (Build 415) (OS 5.1.2600 Service Pack 2)
. 2009-02-28 10:29:20.453 Login time: Saturday, February 28, 2009 10:29:20 AM
. 2009-02-28 10:29:20.453 --------------------------------------------------------------------------
. 2009-02-28 10:29:20.453 Session name: user@ftp1.ftpsite.com
. 2009-02-28 10:29:20.453 Host name: ftp1.ftpsite.com (Port: 21)
. 2009-02-28 10:29:20.453 User name: user(Password: Yes, Key file: No)
. 2009-02-28 10:29:20.453 Tunnel: No
. 2009-02-28 10:29:20.453 Transfer Protocol: FTP
. 2009-02-28 10:29:20.453 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2009-02-28 10:29:20.453 Proxy: none
. 2009-02-28 10:29:20.453 FTP: Passive: No
. 2009-02-28 10:29:20.453 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2009-02-28 10:29:20.453 Cache directory changes: Yes, Permanent: Yes
. 2009-02-28 10:29:20.453 DST mode: 1
. 2009-02-28 10:29:20.453 --------------------------------------------------------------------------
. 2009-02-28 10:29:20.656 Connecting to ftp1.ftpsite.com ...
. 2009-02-28 10:29:21.687 Connected with ftp1.ftpsite.com. Waiting for welcome message...
< 2009-02-28 10:29:21.796 220 Serv-U FTP Server v6.3 for WinSock ready...
> 2009-02-28 10:29:21.796 USER user
< 2009-02-28 10:29:21.890 331 User name okay, need password.
> 2009-02-28 10:29:21.890 PASS *******
< 2009-02-28 10:29:22.000 230 User logged in, proceed.
> 2009-02-28 10:29:22.000 SYST
< 2009-02-28 10:29:22.078 215 UNIX Type: L8
> 2009-02-28 10:29:22.078 FEAT
< 2009-02-28 10:29:22.296 211-Extension supported
< 2009-02-28 10:29:22.453 AUTH TLS
< 2009-02-28 10:29:22.453 SSCN
< 2009-02-28 10:29:22.453 PBSZ
< 2009-02-28 10:29:22.453 PROT
< 2009-02-28 10:29:22.453 CCC
< 2009-02-28 10:29:22.453 CLNT
< 2009-02-28 10:29:22.453 MDTM
< 2009-02-28 10:29:22.453 MDTM YYYYMMDDHHMMSS[+-TZ];filename
< 2009-02-28 10:29:22.453 SIZE
< 2009-02-28 10:29:22.453 SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG
< 2009-02-28 10:29:22.453 REST STREAM
< 2009-02-28 10:29:22.453 XCRC filename;start;end
< 2009-02-28 10:29:22.453 MODE Z
< 2009-02-28 10:29:22.453 MLST Type*;Size*;Create;Modify*;Win32.ea*;
< 2009-02-28 10:29:22.453 211 End
. 2009-02-28 10:29:22.453 Connected
. 2009-02-28 10:29:22.453 --------------------------------------------------------------------------
. 2009-02-28 10:29:22.453 Using FTP protocol.
. 2009-02-28 10:29:22.468 Doing startup conversation with host.
> 2009-02-28 10:29:22.468 PWD
< 2009-02-28 10:29:22.562 257 "/d:/ftproot/titles" is current directory.
. 2009-02-28 10:29:22.578 Getting current directory name.
. 2009-02-28 10:29:22.578 Startup conversation with host finished.
. 2009-02-28 10:29:22.578 Cached directory change via "titleswk" to "/d:/ftproot/titles/titleswk".
. 2009-02-28 10:29:22.578 Getting current directory name.
. 2009-02-28 10:29:22.578 Listing file "ecpacat.txt".
. 2009-02-28 10:29:22.578 Retrieving directory listing...
> 2009-02-28 10:29:22.593 CWD /d:/ftproot/titles/titleswk/
< 2009-02-28 10:29:22.687 250 Directory changed to /d:/ftproot/titles/Titleswk
> 2009-02-28 10:29:22.687 PWD
< 2009-02-28 10:29:22.765 257 "/d:/ftproot/titles/Titleswk" is current directory.
> 2009-02-28 10:29:22.765 TYPE A
< 2009-02-28 10:29:22.828 200 Type set to A.
> 2009-02-28 10:29:22.828 PORT 192,168,1,5,8,129
< 2009-02-28 10:29:22.890 200 PORT Command successful.
> 2009-02-28 10:29:22.890 LIST -a
< 2009-02-28 10:29:23.078 150 Opening ASCII mode data connection for /bin/ls.
< 2009-02-28 10:29:24.328 226 Transfer complete.
. 2009-02-28 10:29:24.328 Directory listing successful
. 2009-02-28 10:29:24.328 File: "/d:/ftproot/titles/titleswk/ecpacat.txt"
. 2009-02-28 10:29:24.328 Copying "/d:/ftproot/titles/titleswk/ecpacat.txt" to local directory started.
. 2009-02-28 10:29:24.328 Ascii transfer mode selected.
. 2009-02-28 10:29:24.328 Starting download of /d:/ftproot/titles/titleswk/ecpacat.txt
> 2009-02-28 10:29:24.328 CWD /d:/ftproot/titles/titleswk/
< 2009-02-28 10:29:24.406 250 Directory changed to /d:/ftproot/titles/Titleswk
> 2009-02-28 10:29:24.406 PWD
< 2009-02-28 10:29:24.468 257 "/d:/ftproot/titles/Titleswk" is current directory.
. 2009-02-28 10:29:24.468 Copying files from remote side failed.
* 2009-02-28 10:29:24.468 (ExtException) Copying files from remote side failed.
* 2009-02-28 10:29:24.468 "/d:/ftproot/titles/Titleswk" is current directory.
. 2009-02-28 10:29:24.468 Asking user:
. 2009-02-28 10:29:24.468 Error transferring file '/d:/ftproot/titles/titleswk/ecpacat.txt'. ("Copying files from remote side failed.","""/d:/ftproot/titles/Titleswk"" is current directory.")

Reply with quote

Advertisement

kevin_bullen
Joined:
Posts:
2
Location:
Michigan

Re: Copying files from remote side failed.

martin wrote:

Please post and a log file from successful manual download.

Working Log:

. 2009-03-02 08:36:29.703 --------------------------------------------------------------------------
. 2009-03-02 08:36:29.703 WinSCP Version 4.1.8 (Build 415) (OS 5.1.2600 Service Pack 2)
. 2009-03-02 08:36:29.703 Login time: Monday, March 02, 2009 8:36:29 AM
. 2009-03-02 08:36:29.703 --------------------------------------------------------------------------
. 2009-03-02 08:36:29.703 Session name: userid@ftp1.ftpsite.com
. 2009-03-02 08:36:29.703 Host name: ftp1.ftpsite.com (Port: 21)
. 2009-03-02 08:36:29.703 User name: userid(Password: Yes, Key file: No)
. 2009-03-02 08:36:29.703 Tunnel: No
. 2009-03-02 08:36:29.703 Transfer Protocol: FTP
. 2009-03-02 08:36:29.703 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2009-03-02 08:36:29.703 Proxy: none
. 2009-03-02 08:36:29.703 FTP: Passive: No
. 2009-03-02 08:36:29.703 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2009-03-02 08:36:29.703 Cache directory changes: Yes, Permanent: Yes
. 2009-03-02 08:36:29.703 DST mode: 1
. 2009-03-02 08:36:29.703 --------------------------------------------------------------------------
. 2009-03-02 08:36:29.812 Connecting to ftp1.ftpsite.com ...
. 2009-03-02 08:36:30.000 Connected with ftp1.ftpsite.com. Waiting for welcome message...
< 2009-03-02 08:36:30.062 220 Serv-U FTP Server v6.3 for WinSock ready...
> 2009-03-02 08:36:30.062 USER userid
< 2009-03-02 08:36:30.125 331 User name okay, need password.
> 2009-03-02 08:36:30.125 PASS *******
< 2009-03-02 08:36:30.218 230 User logged in, proceed.
> 2009-03-02 08:36:30.218 SYST
< 2009-03-02 08:36:30.265 215 UNIX Type: L8
> 2009-03-02 08:36:30.265 FEAT
< 2009-03-02 08:36:30.484 211-Extension supported
< 2009-03-02 08:36:30.671 AUTH TLS
< 2009-03-02 08:36:30.671 SSCN
< 2009-03-02 08:36:30.671 PBSZ
< 2009-03-02 08:36:30.687 PROT
< 2009-03-02 08:36:30.687 CCC
< 2009-03-02 08:36:30.687 CLNT
< 2009-03-02 08:36:30.687 MDTM
< 2009-03-02 08:36:30.687 MDTM YYYYMMDDHHMMSS[+-TZ];filename
< 2009-03-02 08:36:30.687 SIZE
< 2009-03-02 08:36:30.687 SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG
< 2009-03-02 08:36:30.687 REST STREAM
< 2009-03-02 08:36:30.687 XCRC filename;start;end
< 2009-03-02 08:36:30.687 MODE Z
< 2009-03-02 08:36:30.687 MLST Type*;Size*;Create;Modify*;Win32.ea*;
< 2009-03-02 08:36:30.687 211 End
. 2009-03-02 08:36:30.687 Connected
. 2009-03-02 08:36:30.687 --------------------------------------------------------------------------
. 2009-03-02 08:36:30.687 Using FTP protocol.
. 2009-03-02 08:36:30.687 Doing startup conversation with host.
> 2009-03-02 08:36:30.687 PWD
< 2009-03-02 08:36:31.125 257 "/d:/ftproot/titles" is current directory.
. 2009-03-02 08:36:31.125 Getting current directory name.
. 2009-03-02 08:36:31.125 Retrieving directory listing...
> 2009-03-02 08:36:31.125 TYPE A
< 2009-03-02 08:36:31.187 200 Type set to A.
> 2009-03-02 08:36:31.187 PORT 10,1,15,189,5,197
< 2009-03-02 08:36:31.281 200 PORT Command successful.
> 2009-03-02 08:36:31.281 LIST -a
< 2009-03-02 08:36:31.390 150 Opening ASCII mode data connection for /bin/ls.
< 2009-03-02 08:36:31.593 226 Transfer complete.
. 2009-03-02 08:36:31.593 Directory listing successful
. 2009-03-02 08:36:31.593 Startup conversation with host finished.
. 2009-03-02 08:36:33.187 Cached directory change via "Titleswk" to "/d:/ftproot/titles/Titleswk".
. 2009-03-02 08:36:33.187 Getting current directory name.
. 2009-03-02 08:36:33.187 Retrieving directory listing...
> 2009-03-02 08:36:33.187 CWD /d:/ftproot/titles/Titleswk/
< 2009-03-02 08:36:33.265 250 Directory changed to /d:/ftproot/titles/Titleswk
> 2009-03-02 08:36:33.265 PWD
< 2009-03-02 08:36:33.328 257 "/d:/ftproot/titles/Titleswk" is current directory.
> 2009-03-02 08:36:33.328 TYPE A
< 2009-03-02 08:36:33.406 200 Type set to A.
> 2009-03-02 08:36:33.406 PORT 10,1,15,189,5,198
< 2009-03-02 08:36:33.468 200 PORT Command successful.
> 2009-03-02 08:36:33.468 LIST -a
< 2009-03-02 08:36:33.546 150 Opening ASCII mode data connection for /bin/ls.
< 2009-03-02 08:36:33.687 226 Transfer complete.
. 2009-03-02 08:36:33.687 Directory listing successful
. 2009-03-02 08:36:42.531 File: "/d:/ftproot/titles/Titleswk/ecpacat.txt"
. 2009-03-02 08:36:42.531 Copying "/d:/ftproot/titles/Titleswk/ecpacat.txt" to local directory started.
. 2009-03-02 08:36:42.531 Ascii transfer mode selected.
. 2009-03-02 08:36:42.531 Starting download of /d:/ftproot/titles/Titleswk/ecpacat.txt
> 2009-03-02 08:36:42.531 TYPE A
< 2009-03-02 08:36:42.609 200 Type set to A.
> 2009-03-02 08:36:42.609 PORT 10,1,15,189,5,199
< 2009-03-02 08:36:42.718 200 PORT Command successful.
> 2009-03-02 08:36:42.718 RETR ecpacat.txt
< 2009-03-02 08:36:42.812 150 Opening ASCII mode data connection for ecpacat.txt (137418 Bytes).
< 2009-03-02 08:36:43.484 226 Transfer complete.
. 2009-03-02 08:36:43.484 Download successful
. 2009-03-02 08:36:50.906 Disconnected from server

Reply with quote

Advertisement

You can post new topics in this forum