Move Files From Server Locally
Hi! javascript:emoticon(':D')
Very Happy
Thanks for this great program! I am writing a batch in order to MOVE Files from a server directory to my local machine.
What is the correct command?
Here is my command:
--------------------------------------------------------------------------------------
winscp3 ben@10.9.9.9 /Command "option batch on" "option confirm off" "option transfer binary" "cd In" "mv *.* C:/In/*.*" "close" "exit" /Log=C:\tmp\WINSCP.log
--------------------------------------------------------------------------------------
Here the trace:
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 WinSCP Version 3.8.2 (Build 330) (OS 5.0.2195 Service Pack 4)
. 2006-10-18 17:46:33.351 Login time: mercredi 18 octobre 2006 17:46:33
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 Session name: ben@10.9.9.9
. 2006-10-18 17:46:33.351 Host name: 10.9.9.9 (Port: 22)
. 2006-10-18 17:46:33.351 User name: ben (Password: No, Key file: Yes)
. 2006-10-18 17:46:33.351 Transfer Protocol: SFTP
. 2006-10-18 17:46:33.351 SSH protocol version: 2; Compression: No
. 2006-10-18 17:46:33.351 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2006-10-18 17:46:33.351 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2006-10-18 17:46:33.351 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2006-10-18 17:46:33.351 SSH Bugs: -,-,-,-,-,-,-,-
. 2006-10-18 17:46:33.351 SFTP Bugs: -,-,-
. 2006-10-18 17:46:33.351 Proxy: none
. 2006-10-18 17:46:33.351 Return code variable: Autodetect; Lookup user groups: Yes
. 2006-10-18 17:46:33.351 Shell: default, EOL: 0
. 2006-10-18 17:46:33.351 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2006-10-18 17:46:33.351 Cache directory changes: Yes, Permanent: Yes
. 2006-10-18 17:46:33.351 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2006-10-18 17:46:33.351 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 Looking up host "10.9.9.9"
. 2006-10-18 17:46:33.351 Connecting to 10.9.9.9 port 22
. 2006-10-18 17:46:33.461 Server version: SSH-2.0-1.71 sshlib: WinSSHD 4.02
. 2006-10-18 17:46:33.461 We claim version: SSH-2.0-WinSCP_release_3.8.2
. 2006-10-18 17:46:33.461 Using SSH protocol version 2
. 2006-10-18 17:46:33.461 Doing Diffie-Hellman group exchange
. 2006-10-18 17:46:33.651 Doing Diffie-Hellman key exchange
. 2006-10-18 17:46:34.112 Host key fingerprint is:
. 2006-10-18 17:46:34.122 ssh-dss 1024 b1:4b:b0:34:55:6c:98:01:41:4f:3b:6f:fc:1c:f2:8e
. 2006-10-18 17:46:34.122 Initialised AES-256 client->server encryption
. 2006-10-18 17:46:34.122 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-10-18 17:46:34.122 Initialised AES-256 server->client encryption
. 2006-10-18 17:46:34.122 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-10-18 17:46:34.252 Using username "ben".
. 2006-10-18 17:46:34.252 Reading private key file "C:\BenKeys sshkey\benServername.ppk"
. 2006-10-18 17:46:34.252 Pageant is running. Requesting keys.
. 2006-10-18 17:46:34.252 Pageant has 1 SSH-2 keys
. 2006-10-18 17:46:34.252 Trying Pageant key #0
. 2006-10-18 17:46:34.252 This key matches configured key file
! 2006-10-18 17:46:34.272 Authenticating with public key "rsa-key-20060926" from agent.
. 2006-10-18 17:46:34.402 Sending Pageant's response
. 2006-10-18 17:46:34.432 Access granted
. 2006-10-18 17:46:34.432 Opened channel for session
. 2006-10-18 17:46:34.442 Started a shell/command
. 2006-10-18 17:46:34.442 --------------------------------------------------------------------------
. 2006-10-18 17:46:34.442 Using SFTP protocol.
. 2006-10-18 17:46:34.442 Doing startup conversation with host.
> 2006-10-18 17:46:34.442 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2006-10-18 17:46:34.612 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2006-10-18 17:46:34.622 SFTP version 2 negotiated.
. 2006-10-18 17:46:34.622 We believe the server has signed timestamps bug
. 2006-10-18 17:46:34.622 We will use UTF-8 strings for status messages only
. 2006-10-18 17:46:34.622 Getting current directory name.
. 2006-10-18 17:46:34.622 Getting real path for '.'
> 2006-10-18 17:46:34.622 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2006-10-18 17:46:34.622 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2006-10-18 17:46:34.622 Real path is '/'
. 2006-10-18 17:46:34.622 Startup conversation with host finished.
. 2006-10-18 17:46:34.622 Cached directory change via "In" to "/In".
. 2006-10-18 17:46:34.622 Getting current directory name.
. 2006-10-18 17:46:34.622 Listing directory "/In".
> 2006-10-18 17:46:34.622 Type: SSH_FXP_OPENDIR, Size: 12, Number: 267
< 2006-10-18 17:46:34.622 Type: SSH_FXP_HANDLE, Size: 10, Number: 267
> 2006-10-18 17:46:34.622 Type: SSH_FXP_READDIR, Size: 10, Number: 524
< 2006-10-18 17:46:34.632 Type: SSH_FXP_NAME, Size: 189, Number: 524
> 2006-10-18 17:46:34.632 Type: SSH_FXP_READDIR, Size: 10, Number: 780
< 2006-10-18 17:46:34.632 Type: SSH_FXP_STATUS, Size: 9, Number: 780
< 2006-10-18 17:46:34.632 Status/error code: 1
> 2006-10-18 17:46:34.632 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
. 2006-10-18 17:46:34.632 Closing connection.
Very Happy
Thanks for this great program! I am writing a batch in order to MOVE Files from a server directory to my local machine.
What is the correct command?
Here is my command:
--------------------------------------------------------------------------------------
winscp3 ben@10.9.9.9 /Command "option batch on" "option confirm off" "option transfer binary" "cd In" "mv *.* C:/In/*.*" "close" "exit" /Log=C:\tmp\WINSCP.log
--------------------------------------------------------------------------------------
Here the trace:
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 WinSCP Version 3.8.2 (Build 330) (OS 5.0.2195 Service Pack 4)
. 2006-10-18 17:46:33.351 Login time: mercredi 18 octobre 2006 17:46:33
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 Session name: ben@10.9.9.9
. 2006-10-18 17:46:33.351 Host name: 10.9.9.9 (Port: 22)
. 2006-10-18 17:46:33.351 User name: ben (Password: No, Key file: Yes)
. 2006-10-18 17:46:33.351 Transfer Protocol: SFTP
. 2006-10-18 17:46:33.351 SSH protocol version: 2; Compression: No
. 2006-10-18 17:46:33.351 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2006-10-18 17:46:33.351 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2006-10-18 17:46:33.351 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2006-10-18 17:46:33.351 SSH Bugs: -,-,-,-,-,-,-,-
. 2006-10-18 17:46:33.351 SFTP Bugs: -,-,-
. 2006-10-18 17:46:33.351 Proxy: none
. 2006-10-18 17:46:33.351 Return code variable: Autodetect; Lookup user groups: Yes
. 2006-10-18 17:46:33.351 Shell: default, EOL: 0
. 2006-10-18 17:46:33.351 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2006-10-18 17:46:33.351 Cache directory changes: Yes, Permanent: Yes
. 2006-10-18 17:46:33.351 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2006-10-18 17:46:33.351 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2006-10-18 17:46:33.351 --------------------------------------------------------------------------
. 2006-10-18 17:46:33.351 Looking up host "10.9.9.9"
. 2006-10-18 17:46:33.351 Connecting to 10.9.9.9 port 22
. 2006-10-18 17:46:33.461 Server version: SSH-2.0-1.71 sshlib: WinSSHD 4.02
. 2006-10-18 17:46:33.461 We claim version: SSH-2.0-WinSCP_release_3.8.2
. 2006-10-18 17:46:33.461 Using SSH protocol version 2
. 2006-10-18 17:46:33.461 Doing Diffie-Hellman group exchange
. 2006-10-18 17:46:33.651 Doing Diffie-Hellman key exchange
. 2006-10-18 17:46:34.112 Host key fingerprint is:
. 2006-10-18 17:46:34.122 ssh-dss 1024 b1:4b:b0:34:55:6c:98:01:41:4f:3b:6f:fc:1c:f2:8e
. 2006-10-18 17:46:34.122 Initialised AES-256 client->server encryption
. 2006-10-18 17:46:34.122 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-10-18 17:46:34.122 Initialised AES-256 server->client encryption
. 2006-10-18 17:46:34.122 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-10-18 17:46:34.252 Using username "ben".
. 2006-10-18 17:46:34.252 Reading private key file "C:\BenKeys sshkey\benServername.ppk"
. 2006-10-18 17:46:34.252 Pageant is running. Requesting keys.
. 2006-10-18 17:46:34.252 Pageant has 1 SSH-2 keys
. 2006-10-18 17:46:34.252 Trying Pageant key #0
. 2006-10-18 17:46:34.252 This key matches configured key file
! 2006-10-18 17:46:34.272 Authenticating with public key "rsa-key-20060926" from agent.
. 2006-10-18 17:46:34.402 Sending Pageant's response
. 2006-10-18 17:46:34.432 Access granted
. 2006-10-18 17:46:34.432 Opened channel for session
. 2006-10-18 17:46:34.442 Started a shell/command
. 2006-10-18 17:46:34.442 --------------------------------------------------------------------------
. 2006-10-18 17:46:34.442 Using SFTP protocol.
. 2006-10-18 17:46:34.442 Doing startup conversation with host.
> 2006-10-18 17:46:34.442 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2006-10-18 17:46:34.612 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2006-10-18 17:46:34.622 SFTP version 2 negotiated.
. 2006-10-18 17:46:34.622 We believe the server has signed timestamps bug
. 2006-10-18 17:46:34.622 We will use UTF-8 strings for status messages only
. 2006-10-18 17:46:34.622 Getting current directory name.
. 2006-10-18 17:46:34.622 Getting real path for '.'
> 2006-10-18 17:46:34.622 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2006-10-18 17:46:34.622 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2006-10-18 17:46:34.622 Real path is '/'
. 2006-10-18 17:46:34.622 Startup conversation with host finished.
. 2006-10-18 17:46:34.622 Cached directory change via "In" to "/In".
. 2006-10-18 17:46:34.622 Getting current directory name.
. 2006-10-18 17:46:34.622 Listing directory "/In".
> 2006-10-18 17:46:34.622 Type: SSH_FXP_OPENDIR, Size: 12, Number: 267
< 2006-10-18 17:46:34.622 Type: SSH_FXP_HANDLE, Size: 10, Number: 267
> 2006-10-18 17:46:34.622 Type: SSH_FXP_READDIR, Size: 10, Number: 524
< 2006-10-18 17:46:34.632 Type: SSH_FXP_NAME, Size: 189, Number: 524
> 2006-10-18 17:46:34.632 Type: SSH_FXP_READDIR, Size: 10, Number: 780
< 2006-10-18 17:46:34.632 Type: SSH_FXP_STATUS, Size: 9, Number: 780
< 2006-10-18 17:46:34.632 Status/error code: 1
> 2006-10-18 17:46:34.632 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
. 2006-10-18 17:46:34.632 Closing connection.