sorry ;-)
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open root:xxxxx@server2.xxxxxxx.de
# Change remote directory
#cd /home/backup/
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
synchronize local -delete -nopermissions C:\BACKUP\ /home/backup/
# Disconnect
close
# Exit WinSCP
exit
its hard to capture the output, because when i start the batch windows opens a new window.
after the program has finished, the window closes immediately ;(
here is another part of the logfile:
. 2008-06-12 12:21:37.906 --------------------------------------------------------------------------
. 2008-06-12 12:21:37.906 Using SFTP protocol.
. 2008-06-12 12:21:37.906 Doing startup conversation with host.
> 2008-06-12 12:21:37.906 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2008-06-12 12:21:37.937 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2008-06-12 12:21:37.937 SFTP version 3 negotiated.
. 2008-06-12 12:21:37.937 We believe the server has signed timestamps bug
. 2008-06-12 12:21:37.937 We will use UTF-8 strings for status messages only
. 2008-06-12 12:21:37.937 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2008-06-12 12:21:37.937 Getting current directory name.
. 2008-06-12 12:21:37.937 Getting real path for '.'
> 2008-06-12 12:21:37.937 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2008-06-12 12:21:37.953 Type: SSH_FXP_NAME, Size: 31, Number: 16
. 2008-06-12 12:21:37.953 Real path is '/root'
. 2008-06-12 12:21:37.953 Startup conversation with host finished.
. 2008-06-12 12:21:37.953 Collecting synchronization list for local directory 'C:\BACKUP\' and remote directory '/home/backup/', mode = 1, params = 3
. 2008-06-12 12:21:37.953 Listing directory "/home/backup".
> 2008-06-12 12:21:37.953 Type: SSH_FXP_OPENDIR, Size: 21, Number: 267
< 2008-06-12 12:21:37.968 Type: SSH_FXP_HANDLE, Size: 13, Number: 267
> 2008-06-12 12:21:37.968 Type: SSH_FXP_READDIR, Size: 13, Number: 524
< 2008-06-12 12:21:38.000 Type: SSH_FXP_NAME, Size: 1491, Number: 524
> 2008-06-12 12:21:38.000 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2008-06-12 12:21:38.015 Type: SSH_FXP_STATUS, Size: 28, Number: 780
< 2008-06-12 12:21:38.015 Status/error code: 1
at the end, you can see, there it says:
< 2008-06-12 12:21:38.015 Status/error code: 1
maybe it has something to do with the command
Listing directory "/home/backup"
thank you....