Topic "force utf-8 in console and script"

Author Message
Guest




I am trying to write a script to backup my files with sftp with winscp 4.19 to a mac os x machine. Noticed already in the GUI version that i have to put UTF-8 encoding for filenames to ON in order to transfer files with Swedish characters. Now I cant figure out how to get that setting in scripts/console since those files with swedish chars fail horribly in the console. Anyone?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Please read FAQ. If that does not help, come back.
_________________
Martin Prikryl
arekde

Guest


Hi
prikryl wrote:
Please read FAQ. If that does not help, come back.


I have similar problem. I use to copy from winXp (1250) to Debian (UTF-Cool :
winscp /console /script=example.txt /ini=WinSCP.ini

I have in WinSCP.ini lines:
...
[Sessions\myname@myhost.pl]
...
Utf=1
...

It's not working.
When I using WinSCP.exe with this ini file, it working properly, but WinSCP.com not using "Utf=1".
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Please post a log file for both cases.
_________________
Martin Prikryl
arekde

Guest


20100326_winscp_console.log

Code:

. 2010-03-26 11:08:07.328 --------------------------------------------------------------------------
. 2010-03-26 11:08:07.328 WinSCP Wersja 4.2.7 (Build 758) (OS 5.1.2600 Dodatek Service Pack 3)
. 2010-03-26 11:08:07.328 Login time: 26 marzec 2010 11:08:07
. 2010-03-26 11:08:07.328 --------------------------------------------------------------------------
. 2010-03-26 11:08:07.328 Session name: myname@mydomain.pl
. 2010-03-26 11:08:07.328 Host name: mydomain.pl (Port: 10022)
. 2010-03-26 11:08:07.328 User name: myname (Password: Yes, Key file: No)
. 2010-03-26 11:08:07.328 Tunnel: No
. 2010-03-26 11:08:07.328 Transfer Protocol: SFTP (SCP)
. 2010-03-26 11:08:07.328 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-03-26 11:08:07.328 Proxy: none
. 2010-03-26 11:08:07.328 SSH protocol version: 2; Compression: No
. 2010-03-26 11:08:07.328 Bypass authentication: No
. 2010-03-26 11:08:07.328 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-03-26 11:08:07.328 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-03-26 11:08:07.328 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-03-26 11:08:07.328 SFTP Bugs: -,-
. 2010-03-26 11:08:07.328 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-03-26 11:08:07.328 Shell: default, EOL: 0
. 2010-03-26 11:08:07.328 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-03-26 11:08:07.328 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-03-26 11:08:07.328 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-03-26 11:08:07.328 Cache directory changes: Yes, Permanent: Yes
. 2010-03-26 11:08:07.328 DST mode: 1
. 2010-03-26 11:08:07.328 --------------------------------------------------------------------------
. 2010-03-26 11:08:07.328 Looking up host "mydomain.pl"
. 2010-03-26 11:08:07.343 Connecting to (ip deleted) port 10022
. 2010-03-26 11:08:07.375 Server version: SSH-2.0-OpenSSH_5.1p1 Debian-5
. 2010-03-26 11:08:07.375 Using SSH protocol version 2
. 2010-03-26 11:08:07.375 We claim version: SSH-2.0-WinSCP_release_4.2.7
. 2010-03-26 11:08:07.375 Doing Diffie-Hellman group exchange
. 2010-03-26 11:08:07.375 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-03-26 11:08:07.515 Host key fingerprint is:
. 2010-03-26 11:08:07.515 ssh-rsa 2048 2b:e0:78:f3:32:20:48:50:9f:c4:17:0c:0a:14:6d:60
. 2010-03-26 11:08:07.515 Initialised AES-256 SDCTR client->server encryption
. 2010-03-26 11:08:07.515 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-03-26 11:08:07.515 Initialised AES-256 SDCTR server->client encryption
. 2010-03-26 11:08:07.515 Initialised HMAC-SHA1 server->client MAC algorithm
! 2010-03-26 11:08:07.562 Using username "myname".
. 2010-03-26 11:08:07.578 Prompt (6, SSH password, , &Hasło: )
. 2010-03-26 11:08:07.578 Using stored password.
. 2010-03-26 11:08:07.578 Sent password
. 2010-03-26 11:08:07.578 Access granted
. 2010-03-26 11:08:07.578 Opened channel for session
. 2010-03-26 11:08:07.625 Started a shell/command
. 2010-03-26 11:08:07.625 --------------------------------------------------------------------------
. 2010-03-26 11:08:07.625 Using SFTP protocol.
. 2010-03-26 11:08:07.625 Doing startup conversation with host.
> 2010-03-26 11:08:07.625 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-03-26 11:08:07.625 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2010-03-26 11:08:07.625 SFTP version 3 negotiated.
. 2010-03-26 11:08:07.625 Unknown server extension posix-rename@openssh.com="1"
. 2010-03-26 11:08:07.625 Unknown server extension statvfs@openssh.com="2"
. 2010-03-26 11:08:07.625 Unknown server extension fstatvfs@openssh.com="2"
. 2010-03-26 11:08:07.625 We believe the server has signed timestamps bug
. 2010-03-26 11:08:07.625 We will use UTF-8 strings for status messages only
. 2010-03-26 11:08:07.625 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2010-03-26 11:08:07.625 Getting current directory name.
. 2010-03-26 11:08:07.625 Getting real path for '.'
> 2010-03-26 11:08:07.625 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-03-26 11:08:07.625 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2010-03-26 11:08:07.625 Real path is '/'
. 2010-03-26 11:08:07.625 Startup conversation with host finished.
. 2010-03-26 11:08:07.625 Creating directory "/MojePliki/test".
. 2010-03-26 11:08:07.625 Canonifying: "/MojePliki/test"
. 2010-03-26 11:08:07.625 Getting real path for '/MojePliki/test'
> 2010-03-26 11:08:07.625 Type: SSH_FXP_REALPATH, Size: 24, Number: 528
< 2010-03-26 11:08:07.640 Type: SSH_FXP_NAME, Size: 51, Number: 528
. 2010-03-26 11:08:07.640 Real path is '/MojePliki/test'
. 2010-03-26 11:08:07.640 Canonified: "/MojePliki/test"
> 2010-03-26 11:08:07.640 Type: SSH_FXP_MKDIR, Size: 28, Number: 270
< 2010-03-26 11:08:07.640 Type: SSH_FXP_STATUS, Size: 24, Number: 270
< 2010-03-26 11:08:07.640 Status code: 4, Message: 270, Server: Failure, Language: 
. 2010-03-26 11:08:07.640 Asking user:
. 2010-03-26 11:08:07.640 Nie można utworzyć katalogu '/MojePliki/test'. ("Oglna awaria.
. 2010-03-26 11:08:07.640 Kod błędu: 4
. 2010-03-26 11:08:07.640 Komunikat błędu serwera: Failure
. 2010-03-26 11:08:07.640 Żądany kod: 14")
. 2010-03-26 11:08:07.640 Cached directory change via "/MojePliki/test" to "/MojePliki/test".
. 2010-03-26 11:08:07.640 Getting current directory name.
. 2010-03-26 11:08:07.640 Collecting synchronization list for local directory 'C:\test' and remote directory '/MojePliki/test', mode = 0, params = 2
. 2010-03-26 11:08:07.640 Listing directory "/MojePliki/test".
> 2010-03-26 11:08:07.640 Type: SSH_FXP_OPENDIR, Size: 24, Number: 779
< 2010-03-26 11:08:07.640 Type: SSH_FXP_HANDLE, Size: 13, Number: 779
> 2010-03-26 11:08:07.640 Type: SSH_FXP_READDIR, Size: 13, Number: 1036
< 2010-03-26 11:08:07.640 Type: SSH_FXP_NAME, Size: 361, Number: 1036
> 2010-03-26 11:08:07.640 Type: SSH_FXP_READDIR, Size: 13, Number: 1292
< 2010-03-26 11:08:07.640 Type: SSH_FXP_STATUS, Size: 28, Number: 1292
< 2010-03-26 11:08:07.640 Status code: 1
> 2010-03-26 11:08:07.640 Type: SSH_FXP_CLOSE, Size: 13, Number: 1540
. 2010-03-26 11:08:07.656 Synchronizing local directory 'C:\test\' with remote directory '/MojePliki/test/', params = 2
. 2010-03-26 11:08:07.656 Copying 3 files/directories to remote directory "/MojePliki/test/"
. 2010-03-26 11:08:07.656   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask: *.*
. 2010-03-26 11:08:07.656   TM: B; ClAr: No; CPS: 0; ExclM(No):
. 2010-03-26 11:08:07.656   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2010-03-26 11:08:07.656 File: "C:\test\gęslą.ini"
. 2010-03-26 11:08:07.656 Copying "C:\test\gęslą.ini" to remote directory started.
. 2010-03-26 11:08:07.656 Binary transfer mode selected.
. 2010-03-26 11:08:07.656 Opening remote file.
> 2010-03-26 11:08:07.656 Type: SSH_FXP_OPEN, Size: 50, Number: 1795
< 2010-03-26 11:08:07.656 Type: SSH_FXP_STATUS, Size: 24, Number: 1540
. 2010-03-26 11:08:07.656 Discarding reserved response
< 2010-03-26 11:08:07.671 Type: SSH_FXP_HANDLE, Size: 13, Number: 1795
> 2010-03-26 11:08:07.671 Type: SSH_FXP_WRITE, Size: 167, Number: 2310
> 2010-03-26 11:08:07.671 Type: SSH_FXP_CLOSE, Size: 13, Number: 2564
> 2010-03-26 11:08:07.671 Type: SSH_FXP_SETSTAT, Size: 46, Number: 2057
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 2310
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 2564
< 2010-03-26 11:08:07.671 Status code: 0
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 2057
< 2010-03-26 11:08:07.671 Status code: 0
. 2010-03-26 11:08:07.671 File: "C:\test\Jaźń.ini"
. 2010-03-26 11:08:07.671 Copying "C:\test\Jaźń.ini" to remote directory started.
. 2010-03-26 11:08:07.671 Binary transfer mode selected.
. 2010-03-26 11:08:07.671 Opening remote file.
> 2010-03-26 11:08:07.671 Type: SSH_FXP_OPEN, Size: 49, Number: 2819
< 2010-03-26 11:08:07.671 Type: SSH_FXP_HANDLE, Size: 13, Number: 2819
> 2010-03-26 11:08:07.671 Type: SSH_FXP_WRITE, Size: 167, Number: 3334
> 2010-03-26 11:08:07.671 Type: SSH_FXP_CLOSE, Size: 13, Number: 3588
> 2010-03-26 11:08:07.671 Type: SSH_FXP_SETSTAT, Size: 45, Number: 3081
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 3334
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 3588
< 2010-03-26 11:08:07.671 Status code: 0
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 3081
< 2010-03-26 11:08:07.671 Status code: 0
. 2010-03-26 11:08:07.671 File: "C:\test\zażłć.ini"
. 2010-03-26 11:08:07.671 Copying "C:\test\zażłć.ini" to remote directory started.
. 2010-03-26 11:08:07.671 Binary transfer mode selected.
. 2010-03-26 11:08:07.671 Opening remote file.
> 2010-03-26 11:08:07.671 Type: SSH_FXP_OPEN, Size: 51, Number: 3843
< 2010-03-26 11:08:07.671 Type: SSH_FXP_HANDLE, Size: 13, Number: 3843
> 2010-03-26 11:08:07.671 Type: SSH_FXP_WRITE, Size: 167, Number: 4358
> 2010-03-26 11:08:07.671 Type: SSH_FXP_CLOSE, Size: 13, Number: 4612
> 2010-03-26 11:08:07.671 Type: SSH_FXP_SETSTAT, Size: 47, Number: 4105
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 4358
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 4612
< 2010-03-26 11:08:07.671 Status code: 0
< 2010-03-26 11:08:07.671 Type: SSH_FXP_STATUS, Size: 24, Number: 4105
< 2010-03-26 11:08:07.671 Status code: 0
. 2010-03-26 11:08:07.671 Closing connection.
. 2010-03-26 11:08:07.671 Sending special code: 12
. 2010-03-26 11:08:07.671 Sent EOF message


20100326_winscp_GUI.log
Code:

. 2010-03-26 11:20:21.765 --------------------------------------------------------------------------
. 2010-03-26 11:20:21.765 WinSCP Wersja 4.2.7 (Build 758) (OS 5.1.2600 Dodatek Service Pack 3)
. 2010-03-26 11:20:21.765 Login time: 26 marzec 2010 11:20:21
. 2010-03-26 11:20:21.765 --------------------------------------------------------------------------
. 2010-03-26 11:20:21.765 Session name: myname@mydomain.pl
. 2010-03-26 11:20:21.765 Host name: mydomain.pl (Port: 10022)
. 2010-03-26 11:20:21.765 User name: myname (Password: No, Key file: No)
. 2010-03-26 11:20:21.765 Tunnel: No
. 2010-03-26 11:20:21.765 Transfer Protocol: SFTP
. 2010-03-26 11:20:21.781 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-03-26 11:20:21.781 Proxy: none
. 2010-03-26 11:20:21.781 SSH protocol version: 2; Compression: No
. 2010-03-26 11:20:21.781 Bypass authentication: No
. 2010-03-26 11:20:21.781 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-03-26 11:20:21.781 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-03-26 11:20:21.781 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-03-26 11:20:21.781 SFTP Bugs: -,-
. 2010-03-26 11:20:21.781 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-03-26 11:20:21.781 Shell: default, EOL: 1
. 2010-03-26 11:20:21.781 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-03-26 11:20:21.781 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-03-26 11:20:21.781 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-03-26 11:20:21.781 Cache directory changes: Yes, Permanent: Yes
. 2010-03-26 11:20:21.781 DST mode: 1
. 2010-03-26 11:20:21.781 --------------------------------------------------------------------------
. 2010-03-26 11:20:21.796 Looking up host "mydomain.pl"
. 2010-03-26 11:20:21.796 Connecting to (ip deleted) port 10022
. 2010-03-26 11:20:21.859 Server version: SSH-2.0-OpenSSH_5.1p1 Debian-5
. 2010-03-26 11:20:21.859 Using SSH protocol version 2
. 2010-03-26 11:20:21.859 We claim version: SSH-2.0-WinSCP_release_4.2.7
. 2010-03-26 11:20:21.859 Doing Diffie-Hellman group exchange
. 2010-03-26 11:20:21.875 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-03-26 11:20:22.015 Host key fingerprint is:
. 2010-03-26 11:20:22.078 ssh-rsa 2048 2b:e0:78:f3:32:20:48:50:9f:c4:17:0c:0a:14:6d:60
. 2010-03-26 11:20:22.078 Initialised AES-256 SDCTR client->server encryption
. 2010-03-26 11:20:22.078 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-03-26 11:20:22.078 Initialised AES-256 SDCTR server->client encryption
. 2010-03-26 11:20:22.078 Initialised HMAC-SHA1 server->client MAC algorithm
! 2010-03-26 11:20:22.109 Using username "myname".
. 2010-03-26 11:20:22.140 Prompt (6, SSH password, , &Hasło: )
. 2010-03-26 11:20:26.625 Sent password
. 2010-03-26 11:20:26.640 Access granted
. 2010-03-26 11:20:26.640 Opened channel for session
. 2010-03-26 11:20:26.687 Started a shell/command
. 2010-03-26 11:20:26.703 --------------------------------------------------------------------------
. 2010-03-26 11:20:26.703 Using SFTP protocol.
. 2010-03-26 11:20:26.703 Doing startup conversation with host.
> 2010-03-26 11:20:26.703 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-03-26 11:20:26.703 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2010-03-26 11:20:26.703 SFTP version 3 negotiated.
. 2010-03-26 11:20:26.703 Unknown server extension posix-rename@openssh.com="1"
. 2010-03-26 11:20:26.703 Unknown server extension statvfs@openssh.com="2"
. 2010-03-26 11:20:26.703 Unknown server extension fstatvfs@openssh.com="2"
. 2010-03-26 11:20:26.703 We believe the server has signed timestamps bug
. 2010-03-26 11:20:26.703 We will use UTF-8 strings when appropriate
. 2010-03-26 11:20:26.703 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2010-03-26 11:20:26.703 Getting current directory name.
. 2010-03-26 11:20:26.703 Getting real path for '.'
> 2010-03-26 11:20:26.703 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-03-26 11:20:26.718 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2010-03-26 11:20:26.718 Real path is '/'
. 2010-03-26 11:20:26.718 Listing directory "/".
> 2010-03-26 11:20:26.718 Type: SSH_FXP_OPENDIR, Size: 10, Number: 267
< 2010-03-26 11:20:26.718 Type: SSH_FXP_HANDLE, Size: 13, Number: 267
> 2010-03-26 11:20:26.718 Type: SSH_FXP_READDIR, Size: 13, Number: 524
< 2010-03-26 11:20:26.734 Type: SSH_FXP_NAME, Size: 663, Number: 524
> 2010-03-26 11:20:26.734 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2010-03-26 11:20:26.734 Type: SSH_FXP_STATUS, Size: 28, Number: 780
< 2010-03-26 11:20:26.734 Status code: 1
> 2010-03-26 11:20:26.734 Type: SSH_FXP_CLOSE, Size: 13, Number: 1028
. 2010-03-26 11:20:26.734 Startup conversation with host finished.
. 2010-03-26 11:20:30.140 Cached directory change via "MojePliki" to "/MojePliki".
. 2010-03-26 11:20:30.140 Getting current directory name.
. 2010-03-26 11:20:30.140 Listing directory "/MojePliki".
> 2010-03-26 11:20:30.140 Type: SSH_FXP_OPENDIR, Size: 19, Number: 1291
< 2010-03-26 11:20:30.140 Type: SSH_FXP_STATUS, Size: 24, Number: 1028
. 2010-03-26 11:20:30.140 Discarding reserved response
< 2010-03-26 11:20:30.140 Type: SSH_FXP_HANDLE, Size: 13, Number: 1291
> 2010-03-26 11:20:30.140 Type: SSH_FXP_READDIR, Size: 13, Number: 1548
< 2010-03-26 11:20:30.156 Type: SSH_FXP_NAME, Size: 311, Number: 1548
> 2010-03-26 11:20:30.156 Type: SSH_FXP_READDIR, Size: 13, Number: 1804
< 2010-03-26 11:20:30.156 Type: SSH_FXP_STATUS, Size: 28, Number: 1804
< 2010-03-26 11:20:30.156 Status code: 1
> 2010-03-26 11:20:30.156 Type: SSH_FXP_CLOSE, Size: 13, Number: 2052
. 2010-03-26 11:20:32.000 Cached directory change via "test" to "/MojePliki/test".
. 2010-03-26 11:20:32.000 Getting current directory name.
. 2010-03-26 11:20:32.000 Listing directory "/MojePliki/test".
> 2010-03-26 11:20:32.000 Type: SSH_FXP_OPENDIR, Size: 24, Number: 2315
< 2010-03-26 11:20:32.000 Type: SSH_FXP_STATUS, Size: 24, Number: 2052
. 2010-03-26 11:20:32.000 Discarding reserved response
< 2010-03-26 11:20:32.000 Type: SSH_FXP_HANDLE, Size: 13, Number: 2315
> 2010-03-26 11:20:32.000 Type: SSH_FXP_READDIR, Size: 13, Number: 2572
< 2010-03-26 11:20:32.000 Type: SSH_FXP_NAME, Size: 207, Number: 2572
> 2010-03-26 11:20:32.000 Type: SSH_FXP_READDIR, Size: 13, Number: 2828
< 2010-03-26 11:20:32.015 Type: SSH_FXP_STATUS, Size: 28, Number: 2828
< 2010-03-26 11:20:32.015 Status code: 1
> 2010-03-26 11:20:32.015 Type: SSH_FXP_CLOSE, Size: 13, Number: 3076
. 2010-03-26 11:20:40.671 Copying 3 files/directories to remote directory "/MojePliki/test/"
. 2010-03-26 11:20:40.687   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: Yes; Mask: *.*
. 2010-03-26 11:20:40.687   TM: B; ClAr: No; CPS: 0; ExclM(No):
. 2010-03-26 11:20:40.687   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2010-03-26 11:20:40.687 File: "C:\test\gęslą.ini"
. 2010-03-26 11:20:40.718 Copying "C:\test\gęslą.ini" to remote directory started.
. 2010-03-26 11:20:40.734 Binary transfer mode selected.
. 2010-03-26 11:20:40.765 Opening remote file.
> 2010-03-26 11:20:40.765 Type: SSH_FXP_OPEN, Size: 52, Number: 3331
< 2010-03-26 11:20:40.765 Type: SSH_FXP_STATUS, Size: 24, Number: 3076
. 2010-03-26 11:20:40.765 Discarding reserved response
< 2010-03-26 11:20:40.765 Type: SSH_FXP_HANDLE, Size: 13, Number: 3331
> 2010-03-26 11:20:40.765 Type: SSH_FXP_WRITE, Size: 167, Number: 3846
> 2010-03-26 11:20:40.765 Type: SSH_FXP_CLOSE, Size: 13, Number: 4100
> 2010-03-26 11:20:40.765 Type: SSH_FXP_SETSTAT, Size: 48, Number: 3593
< 2010-03-26 11:20:40.765 Type: SSH_FXP_STATUS, Size: 24, Number: 3846
< 2010-03-26 11:20:40.765 Type: SSH_FXP_STATUS, Size: 24, Number: 4100
< 2010-03-26 11:20:40.765 Status code: 0
< 2010-03-26 11:20:40.765 Type: SSH_FXP_STATUS, Size: 24, Number: 3593
< 2010-03-26 11:20:40.765 Status code: 0
. 2010-03-26 11:20:40.968 File: "C:\test\Jaźń.ini"
. 2010-03-26 11:20:41.093 Copying "C:\test\Jaźń.ini" to remote directory started.
. 2010-03-26 11:20:41.093 Binary transfer mode selected.
. 2010-03-26 11:20:41.125 Opening remote file.
> 2010-03-26 11:20:41.125 Type: SSH_FXP_OPEN, Size: 51, Number: 4355
< 2010-03-26 11:20:41.125 Type: SSH_FXP_HANDLE, Size: 13, Number: 4355
> 2010-03-26 11:20:41.125 Type: SSH_FXP_WRITE, Size: 167, Number: 4870
> 2010-03-26 11:20:41.125 Type: SSH_FXP_CLOSE, Size: 13, Number: 5124
> 2010-03-26 11:20:41.125 Type: SSH_FXP_SETSTAT, Size: 47, Number: 4617
< 2010-03-26 11:20:41.125 Type: SSH_FXP_STATUS, Size: 24, Number: 4870
< 2010-03-26 11:20:41.125 Type: SSH_FXP_STATUS, Size: 24, Number: 5124
< 2010-03-26 11:20:41.125 Status code: 0
< 2010-03-26 11:20:41.125 Type: SSH_FXP_STATUS, Size: 24, Number: 4617
< 2010-03-26 11:20:41.125 Status code: 0
. 2010-03-26 11:20:41.125 File: "C:\test\zażłć.ini"
. 2010-03-26 11:20:41.328 Copying "C:\test\zażłć.ini" to remote directory started.
. 2010-03-26 11:20:41.343 Binary transfer mode selected.
. 2010-03-26 11:20:41.343 Opening remote file.
> 2010-03-26 11:20:41.343 Type: SSH_FXP_OPEN, Size: 55, Number: 5379
< 2010-03-26 11:20:41.343 Type: SSH_FXP_HANDLE, Size: 13, Number: 5379
> 2010-03-26 11:20:41.359 Type: SSH_FXP_WRITE, Size: 167, Number: 5894
. 2010-03-26 11:20:41.437 1 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2010-03-26 11:20:41.437 Type: SSH_FXP_CLOSE, Size: 13, Number: 6148
> 2010-03-26 11:20:41.437 Type: SSH_FXP_SETSTAT, Size: 51, Number: 5641
< 2010-03-26 11:20:41.437 Type: SSH_FXP_STATUS, Size: 24, Number: 6148
< 2010-03-26 11:20:41.437 Status code: 0
< 2010-03-26 11:20:41.437 Type: SSH_FXP_STATUS, Size: 24, Number: 5641
< 2010-03-26 11:20:41.437 Status code: 0
. 2010-03-26 11:20:41.437 Listing directory "/MojePliki/test".
> 2010-03-26 11:20:41.437 Type: SSH_FXP_OPENDIR, Size: 24, Number: 6411
< 2010-03-26 11:20:41.437 Type: SSH_FXP_HANDLE, Size: 13, Number: 6411
> 2010-03-26 11:20:41.437 Type: SSH_FXP_READDIR, Size: 13, Number: 6668
< 2010-03-26 11:20:41.437 Type: SSH_FXP_NAME, Size: 565, Number: 6668
> 2010-03-26 11:20:41.437 Type: SSH_FXP_READDIR, Size: 13, Number: 6924
< 2010-03-26 11:20:41.437 Type: SSH_FXP_STATUS, Size: 28, Number: 6924
< 2010-03-26 11:20:41.437 Status code: 1
> 2010-03-26 11:20:41.437 Type: SSH_FXP_CLOSE, Size: 13, Number: 7172
. 2010-03-26 11:20:48.375 Closing connection.
. 2010-03-26 11:20:48.375 Sending special code: 12
. 2010-03-26 11:20:48.375 Sent EOF message


My file default.ias
Code:

option batch continue
option confirm off
option transfer binary
option echo on
open myname:mypasswd@mydomain.pl:10022
mkdir "/MojePliki/test"
cd "/MojePliki/test"
lcd "C:\test"
synchronize remote
close
exit


Only differences i see at:
(upper line - console log)

User name: myname (Password: Yes, Key file: No)
User name: myname (Password: No, Key file: No)
(in console mode passwd is in file default.ias, in winscp.exe passwd i writing manually)

Transfer Protocol: SFTP (SCP)
Transfer Protocol: SFTP

Shell: default, EOL: 0
Shell: default, EOL: 1

We will use UTF-8 strings for status messages only
We will use UTF-8 strings when appropriate
[/code]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Obviously console run does not pickup your winscp.ini. Are you sure it can be found in the directory, where WinSCP is run from? Have you tried using full path to winscp.ini?
_________________
Martin Prikryl
arekde

Guest


I used:
C:\Program Files\WinSCP>WinSCP /console /script=default.ias /ini=WinSCP.ini

C:\Program Files\WinSCP>WinSCP.exe /console /script=default.ias /ini=WinSCP.ini

C:\Program Files\WinSCP>WinSCP.com /console /script=default.ias /ini=WinSCP.ini

later i copied into c:\WINSCP (because 'Program Files' undes cmd.exe sometime is like 'progra~1') files from C:\Program Files\WinSCP\ :
WinSCP.exe
WinSCP.com
WinSCP.ini
default.ias
and used:
c:\WINSCP\WinSCP.com /console /script=c:\WINSCP\default.ias /ini=c:\WINSCP\WinSCP.ini
and
c:\WINSCP\WinSCP.com /console /script="c:\WINSCP\default.ias" /ini="c:\WINSCP\WinSCP.ini"

Result is this same.
I don't have file 'winscp.ini' in others directories on my disk.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
_________________
Martin Prikryl
arekde
[View user's profile]

Joined: 2010-03-31
Posts: 2
Location: Poland, Pila
I sent an email to you.
arekde
[View user's profile]

Joined: 2010-03-31
Posts: 2
Location: Poland, Pila
Problem is solved.
For other people: I used incorrect
open [ sftp|ftp|scp:// ][ <user> [ :password ] @ ] <host> [ :<port> ]

but correct is:
open <stored session>

(see https://winscp.net/eng/docs/scriptcommand_open)

because settings of UTF are stored in WinSCP.ini in section:
[Sessions\MySessionNAme]
HostName=example.com
PortNumber=22
UserName=MyName
FSProtocol=2
Utf=1
EOLType=1

Big thanks for 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