Topic "Windows Scheduler - WINSCP - automation"

Author Message
Misc_Lroy

Guest


Hey I am trying to automate the FTP of a txt file I need to use every morning.

I've tried and failed to automatically successfully transfer the txt file. The log actually looks clean but I'm struggling to confirm the issue. The log says the file copied but there's no file in the destination folder.

Any help would be appreciated.

Log below:
. 2015-03-23 12:47:36.453 --------------------------------------------------------------------------
. 2015-03-23 12:47:36.453 WinSCP Version 5.1.0 (Build 2625) (OS 6.2.9200)
. 2015-03-23 12:47:36.453 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2015-03-23 12:47:36.453 Local account:
. 2015-03-23 12:47:36.453 Working directory: C:\windows\system32
. 2015-03-23 12:47:36.453 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files" /log="c:\script\FTP.log" "exit"
. 2015-03-23 12:47:36.453 Login time: 23 March 2015 12:47:36
. 2015-03-23 12:47:36.453 --------------------------------------------------------------------------
. 2015-03-23 12:47:36.453 Session name: exit (Modified stored session)
. 2015-03-23 12:47:36.453 Host name: exit (Port: 22)
. 2015-03-23 12:47:36.453 User name: (Password: No, Key file: No)
. 2015-03-23 12:47:36.453 Tunnel: No
. 2015-03-23 12:47:36.453 Transfer Protocol: SFTP (SCP)
. 2015-03-23 12:47:36.453 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-03-23 12:47:36.453 Proxy: none
. 2015-03-23 12:47:36.453 SSH protocol version: 2; Compression: No
. 2015-03-23 12:47:36.453 Bypass authentication: No
. 2015-03-23 12:47:36.453 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-03-23 12:47:36.453 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-03-23 12:47:36.453 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2015-03-23 12:47:36.453 SFTP Bugs: A,A
. 2015-03-23 12:47:36.453 Return code variable: Autodetect; Lookup user groups: A
. 2015-03-23 12:47:36.453 Shell: default
. 2015-03-23 12:47:36.453 EOL: 0, UTF: 2
. 2015-03-23 12:47:36.453 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-03-23 12:47:36.453 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-03-23 12:47:36.453 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-03-23 12:47:36.453 Cache directory changes: Yes, Permanent: Yes
. 2015-03-23 12:47:36.453 DST mode: 1
. 2015-03-23 12:47:36.453 --------------------------------------------------------------------------
. 2015-03-23 12:47:36.453 Looking up host "exit"
. 2015-03-23 12:47:47.737 --------------------------------------------------------------------------
. 2015-03-23 12:47:47.737 WinSCP Version 5.1.0 (Build 2625) (OS 6.2.9200)
. 2015-03-23 12:47:47.737 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2015-03-23 12:47:47.737
. 2015-03-23 12:47:47.737 Working directory: C:\windows\system32
. 2015-03-23 12:47:47.737 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files" /log="c:\script\FTP.log" "exit"
. 2015-03-23 12:47:47.737 Login time: 23 March 2015 12:47:47
. 2015-03-23 12:47:47.737 --------------------------------------------------------------------------
. 2015-03-23 12:47:47.737 Session name: ftp_access@10.248.36.19 (Modified stored session)
. 2015-03-23 12:47:47.737 Host name: 10.248.36.19 (Port: 21)
. 2015-03-23 12:47:47.737 User name: ftp_access (Password: Yes, Key file: No)
. 2015-03-23 12:47:47.737 Tunnel: No
. 2015-03-23 12:47:47.737 Transfer Protocol: FTP
. 2015-03-23 12:47:47.737 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-03-23 12:47:47.737 Proxy: none
. 2015-03-23 12:47:47.737 FTP: FTPS: None; Passive: Yes [Force IP: A]
. 2015-03-23 12:47:47.737 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-03-23 12:47:47.737 Cache directory changes: Yes, Permanent: Yes
. 2015-03-23 12:47:47.737 DST mode: 1
. 2015-03-23 12:47:47.737 --------------------------------------------------------------------------
. 2015-03-23 12:47:47.737 Connecting to 10.248.36.19 ...
. 2015-03-23 12:47:47.737 Connected with 10.248.36.19. Waiting for welcome message...
< 2015-03-23 12:47:47.737 220 (vsFTPd 2.3.5)
> 2015-03-23 12:47:47.737 USER ftp_access
< 2015-03-23 12:47:47.737 331 Please specify the password.
> 2015-03-23 12:47:47.737 PASS *************
< 2015-03-23 12:47:47.862 230 Login successful.
> 2015-03-23 12:47:47.862 SYST
< 2015-03-23 12:47:47.862 215 UNIX Type: L8
> 2015-03-23 12:47:47.862 FEAT
< 2015-03-23 12:47:47.862 211-Features:
< 2015-03-23 12:47:47.862 EPRT
< 2015-03-23 12:47:47.862 EPSV
< 2015-03-23 12:47:47.862 MDTM
< 2015-03-23 12:47:47.862 PASV
< 2015-03-23 12:47:47.862 REST STREAM
< 2015-03-23 12:47:47.862 SIZE
< 2015-03-23 12:47:47.862 TVFS
< 2015-03-23 12:47:47.862 UTF8
< 2015-03-23 12:47:47.862 211 End
> 2015-03-23 12:47:47.862 OPTS UTF8 ON
< 2015-03-23 12:47:47.862 200 Always in UTF8 mode.
. 2015-03-23 12:47:47.862 Connected
. 2015-03-23 12:47:47.862 --------------------------------------------------------------------------
. 2015-03-23 12:47:47.862 Using FTP protocol.
. 2015-03-23 12:47:47.862 Doing startup conversation with host.
> 2015-03-23 12:47:47.862 PWD
< 2015-03-23 12:47:47.862 257 "/"
. 2015-03-23 12:47:47.862 Getting current directory name.
. 2015-03-23 12:47:47.862 Startup conversation with host finished.
< 2015-03-23 12:47:47.862 Script: Active session: [1] ftp_access@10.248.36.19
> 2015-03-23 12:47:47.862 Script: get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files
. 2015-03-23 12:47:47.862 Listing file "/service_area_analysis.txt".
. 2015-03-23 12:47:47.862 Retrieving directory listing...
> 2015-03-23 12:47:47.862 TYPE A
< 2015-03-23 12:47:47.862 200 Switching to ASCII mode.
> 2015-03-23 12:47:47.862 PASV
< 2015-03-23 12:47:47.862 227 Entering Passive Mode (10,248,36,19,246,83).
> 2015-03-23 12:47:47.862 LIST -a
< 2015-03-23 12:47:47.862 150 Here comes the directory listing.
< 2015-03-23 12:47:47.862 226 Directory send OK.
. 2015-03-23 12:47:47.862 Directory listing successful
. 2015-03-23 12:47:47.893 File: "/service_area_analysis.txt"
. 2015-03-23 12:47:47.893 Copying "/service_area_analysis.txt" to local directory started.
. 2015-03-23 12:47:47.893 Binary transfer mode selected.
. 2015-03-23 12:47:47.924 Starting download of /service_area_analysis.txt
> 2015-03-23 12:47:47.940 TYPE I
< 2015-03-23 12:47:47.940 200 Switching to Binary mode.
> 2015-03-23 12:47:47.940 PASV
< 2015-03-23 12:47:47.940 227 Entering Passive Mode (10,248,36,19,185,201).
> 2015-03-23 12:47:47.987 RETR service_area_analysis.txt
< 2015-03-23 12:47:47.987 150 Opening BINARY mode data connection for service_area_analysis.txt (84790548 bytes).
< 2015-03-23 12:47:56.242 226 Transfer complete.
. 2015-03-23 12:47:56.273 Download successful
. 2015-03-23 12:47:56.273 Script: Exit code: 0
. 2015-03-23 12:47:56.305 Disconnected from server
. 2015-03-23 12:50:00.666 --------------------------------------------------------------------------
. 2015-03-23 12:50:00.666 WinSCP Version 5.1.0 (Build 2625) (OS 6.2.9200)
. 2015-03-23 12:50:00.666 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2015-03-23 12:50:00.666 Local account:
. 2015-03-23 12:50:00.666 Working directory: C:\windows\system32
. 2015-03-23 12:50:00.666 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files" /log="c:\script\FTP.log" "exit"
. 2015-03-23 12:50:00.666 Login time: 23 March 2015 12:50:00
. 2015-03-23 12:50:00.666 --------------------------------------------------------------------------
. 2015-03-23 12:50:00.666 Session name: exit (Modified stored session)
. 2015-03-23 12:50:00.666 Host name: exit (Port: 22)
. 2015-03-23 12:50:00.666 User name: (Password: No, Key file: No)
. 2015-03-23 12:50:00.666 Tunnel: No
. 2015-03-23 12:50:00.666 Transfer Protocol: SFTP (SCP)
. 2015-03-23 12:50:00.666 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-03-23 12:50:00.666 Proxy: none
. 2015-03-23 12:50:00.666 SSH protocol version: 2; Compression: No
. 2015-03-23 12:50:00.666 Bypass authentication: No
. 2015-03-23 12:50:00.666 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-03-23 12:50:00.666 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-03-23 12:50:00.666 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2015-03-23 12:50:00.666 SFTP Bugs: A,A
. 2015-03-23 12:50:00.666 Return code variable: Autodetect; Lookup user groups: A
. 2015-03-23 12:50:00.666 Shell: default
. 2015-03-23 12:50:00.666 EOL: 0, UTF: 2
. 2015-03-23 12:50:00.666 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-03-23 12:50:00.666 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-03-23 12:50:00.666 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-03-23 12:50:00.666 Cache directory changes: Yes, Permanent: Yes
. 2015-03-23 12:50:00.666 DST mode: 1
. 2015-03-23 12:50:00.666 --------------------------------------------------------------------------
. 2015-03-23 12:50:00.729 Looking up host "exit"
. 2015-03-23 12:50:12.102 --------------------------------------------------------------------------
. 2015-03-23 12:50:12.102 WinSCP Version 5.1.0 (Build 2625) (OS 6.2.9200)
. 2015-03-23 12:50:12.102 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2015-03-23 12:50:12.102 Local account:
. 2015-03-23 12:50:12.102 Working directory: C:\windows\system32
. 2015-03-23 12:50:12.102 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files" /log="c:\script\FTP.log" "exit"
. 2015-03-23 12:50:12.102 Login time: 23 March 2015 12:50:12
. 2015-03-23 12:50:12.102 --------------------------------------------------------------------------
. 2015-03-23 12:50:12.102 Session name: ftp_access@10.248.36.19 (Modified stored session)
. 2015-03-23 12:50:12.102 Host name: 10.248.36.19 (Port: 21)
. 2015-03-23 12:50:12.102 User name: ftp_access (Password: Yes, Key file: No)
. 2015-03-23 12:50:12.102 Tunnel: No
. 2015-03-23 12:50:12.102 Transfer Protocol: FTP
. 2015-03-23 12:50:12.102 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-03-23 12:50:12.102 Proxy: none
. 2015-03-23 12:50:12.102 FTP: FTPS: None; Passive: Yes [Force IP: A]
. 2015-03-23 12:50:12.102 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-03-23 12:50:12.102 Cache directory changes: Yes, Permanent: Yes
. 2015-03-23 12:50:12.102 DST mode: 1
. 2015-03-23 12:50:12.102 --------------------------------------------------------------------------
. 2015-03-23 12:50:12.102 Connecting to 10.248.36.19 ...
. 2015-03-23 12:50:12.102 Connected with 10.248.36.19. Waiting for welcome message...
< 2015-03-23 12:50:12.102 220 (vsFTPd 2.3.5)
> 2015-03-23 12:50:12.102 USER ftp_access
< 2015-03-23 12:50:12.102 331 Please specify the password.
> 2015-03-23 12:50:12.102 PASS *************
< 2015-03-23 12:50:12.165 230 Login successful.
> 2015-03-23 12:50:12.165 SYST
< 2015-03-23 12:50:12.165 215 UNIX Type: L8
> 2015-03-23 12:50:12.165 FEAT
< 2015-03-23 12:50:12.165 211-Features:
< 2015-03-23 12:50:12.165 EPRT
< 2015-03-23 12:50:12.165 EPSV
< 2015-03-23 12:50:12.165 MDTM
< 2015-03-23 12:50:12.165 PASV
< 2015-03-23 12:50:12.165 REST STREAM
< 2015-03-23 12:50:12.165 SIZE
< 2015-03-23 12:50:12.165 TVFS
< 2015-03-23 12:50:12.165 UTF8
< 2015-03-23 12:50:12.165 211 End
> 2015-03-23 12:50:12.165 OPTS UTF8 ON
< 2015-03-23 12:50:12.165 200 Always in UTF8 mode.
. 2015-03-23 12:50:12.165 Connected
. 2015-03-23 12:50:12.165 --------------------------------------------------------------------------
. 2015-03-23 12:50:12.165 Using FTP protocol.
. 2015-03-23 12:50:12.165 Doing startup conversation with host.
> 2015-03-23 12:50:12.165 PWD
< 2015-03-23 12:50:12.165 257 "/"
. 2015-03-23 12:50:12.165 Getting current directory name.
. 2015-03-23 12:50:12.165 Startup conversation with host finished.
< 2015-03-23 12:50:12.165 Script: Active session: [1] ftp_access@10.248.36.19
> 2015-03-23 12:50:12.165 Script: get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files
. 2015-03-23 12:50:12.165 Listing file "/service_area_analysis.txt".
. 2015-03-23 12:50:12.165 Retrieving directory listing...
> 2015-03-23 12:50:12.165 TYPE A
< 2015-03-23 12:50:12.165 200 Switching to ASCII mode.
> 2015-03-23 12:50:12.165 PASV
< 2015-03-23 12:50:12.165 227 Entering Passive Mode (10,248,36,19,145,71).
> 2015-03-23 12:50:12.165 LIST -a
< 2015-03-23 12:50:12.165 150 Here comes the directory listing.
< 2015-03-23 12:50:12.165 226 Directory send OK.
. 2015-03-23 12:50:12.165 Directory listing successful
. 2015-03-23 12:50:12.180 File: "/service_area_analysis.txt"
. 2015-03-23 12:50:12.180 Copying "/service_area_analysis.txt" to local directory started.
. 2015-03-23 12:50:12.180 Binary transfer mode selected.
. 2015-03-23 12:50:12.180 Starting download of /service_area_analysis.txt
> 2015-03-23 12:50:12.180 TYPE I
< 2015-03-23 12:50:12.180 200 Switching to Binary mode.
> 2015-03-23 12:50:12.180 PASV
< 2015-03-23 12:50:12.180 227 Entering Passive Mode (10,248,36,19,39,61).
> 2015-03-23 12:50:12.196 RETR service_area_analysis.txt
< 2015-03-23 12:50:12.196 150 Opening BINARY mode data connection for service_area_analysis.txt (84790548 bytes).
< 2015-03-23 12:50:19.408 226 Transfer complete.
. 2015-03-23 12:50:19.439 Download successful
. 2015-03-23 12:50:19.439 Script: Exit code: 0
. 2015-03-23 12:50:19.455 Disconnected from server
Advertisements
Guest




Anyone?? Any help on this?

Thanks in advance!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
1) You should be using a latest version of WinSCP. The 5.1 is pretty old.

2) Your get command syntax is wrong. You should terminate the target path with a backslash:
get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files\

3) Your command-line syntax is wrong too. The exit command must be with the other commands:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt c:\Users\Lennis11\Documents\FTP_Transfer_Files" "exit" /log="c:\script\FTP.log"
Misc_Lroy

Guest


Great stuff many thanks for your help!!!
Misc_Lroy

Guest


Hey I am trying to use the network drive instead of my c drive but I am having an issue with a space that it is not recognizing.

"C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option batch abort" "option confirm off" "open ftp://ftp_access:ftp_access100@10.248.36.19" "get /service_area_analysis.txt '\\Delta\Departments\2 UK Files\3 UK Expo\2) Data\Data checking'" "exit" /log="c:\script\FTP.log"

\\Delta\Departments\2' does not exist.

Anyways I can express this space??????
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
See http://winscp.net/eng/docs/commandline#syntax
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License