can't upload file with ' in beginning and end
Hi
I'm trying to script upload of a file with WinSCP. I can upload the file with FileZilla but I can't upload the file in WinSCP (both the gui and scripted)
The file name is strange : 'RBP.AUVV.AUDKENNI.STARFCER' (and the ' is included in the name)
G:\Vefir\Umsoknir\Strengur>dir *STAR*
Directory of G:\Vefir\Umsoknir\Strengur
26.01.2016 09:38 1.277 'RBP.AUVV.AUDKENNI.STARFCER'
This is a FileZilla log:
2016-01-26 11:55:24 4556 3 Response: 234 Security environment established - ready for negotiation
2016-01-26 11:55:24 4556 3 Status: Initializing TLS...
2016-01-26 11:55:24 4556 3 Status: Verifying certificate...
2016-01-26 11:55:24 4556 3 Status: TLS connection established.
2016-01-26 11:55:24 4556 3 Command: USER auftp01
2016-01-26 11:55:24 4556 3 Response: 331 Send password please.
2016-01-26 11:55:24 4556 3 Command: PASS ********
2016-01-26 11:55:24 4556 3 Response: 230 AUFTP01 is logged on. Working directory is "AUFTP01.".
2016-01-26 11:55:24 4556 3 Status: Server does not support non-ASCII characters.
2016-01-26 11:55:24 4556 3 Command: PBSZ 0
2016-01-26 11:55:24 4556 3 Response: 200 Protection buffer size accepted
2016-01-26 11:55:24 4556 3 Command: PROT P
2016-01-26 11:55:24 4556 3 Response: 200 Data connection protection set to private
2016-01-26 11:55:24 4556 3 Status: Connected
2016-01-26 11:55:24 4556 3 Status: Starting upload of G:\Vefir\Umsoknir\Strengur\'RBP.AUVV.AUDKENNI.STARFCER'
2016-01-26 11:55:24 4556 3 Command: CWD 'AUFTP01.'
2016-01-26 11:55:24 4556 3 Response: 250 "AUFTP01." is the working directory name prefix.
2016-01-26 11:55:24 4556 3 Command: PWD
2016-01-26 11:55:24 4556 3 Response: 257 "'AUFTP01.'" is working directory.
2016-01-26 11:55:24 4556 3 Command: TYPE A
2016-01-26 11:55:24 4556 3 Response: 200 Representation type is Ascii NonPrint
2016-01-26 11:55:24 4556 3 Command: PASV
2016-01-26 11:55:24 4556 3 Response: 227 Entering Passive Mode (193,4,182,35,195,122)
2016-01-26 11:55:24 4556 3 Command: STOR 'RBP.AUVV.AUDKENNI.STARFCER'
2016-01-26 11:55:24 4556 3 Response: 125 Storing data set RBP.AUVV.AUDKENNI.STARFCER
2016-01-26 11:55:24 4556 3 Response: 250 Transfer completed successfully.
2016-01-26 11:55:24 4556 3 Status: File transfer successful, transferred 1.277 bytes in 1 second
2016-01-26 11:55:24 4556 3 Status: Retrieving directory listing of "'AUFTP01.'"...
2016-01-26 11:55:24 4556 3 Command: TYPE I
2016-01-26 11:55:24 4556 3 Response: 200 Representation type is Image
2016-01-26 11:55:24 4556 3 Command: PASV
2016-01-26 11:55:24 4556 3 Response: 227 Entering Passive Mode (193,4,182,35,195,122)
2016-01-26 11:55:24 4556 3 Command: LIST
2016-01-26 11:55:24 4556 3 Response: 550 No data sets found.
2016-01-26 11:55:24 4556 3 Status: Directory listing of "'AUFTP01.'" successful
But if I use WinSCP I can't upload it in gui, get:
Error transfering file 'G:\Vefir\Umsoknir\Strengur\'RBP.AUVV.AUDKENNI.STARFCER". (see problem with ' and ")
If I do it from a script, the put command: put 'RBP.AUVV.AUDKENNI.STARFCER' I get this:
> 2016-01-26 13:22:11.729 Script: put 'RBP.AUVV.AUDKENNI.STARFCER'
. 2016-01-26 13:22:11.729 Copying 1 files/directories to remote directory "'AUFTP01.'"
. 2016-01-26 13:22:11.729 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2016-01-26 13:22:11.729 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2016-01-26 13:22:11.729 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2016-01-26 13:22:11.729 File: ''RBP.AUVV.AUDKENNI.STARFCER'' [2016-01-26T09:38:50.466Z] [1277]
. 2016-01-26 13:22:11.729 Copying "'RBP.AUVV.AUDKENNI.STARFCER'" to remote directory started.
. 2016-01-26 13:22:11.729 Binary transfer mode selected.
. 2016-01-26 13:22:11.729 Starting upload of 'RBP.AUVV.AUDKENNI.STARFCER'
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x0594003D)
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
> 2016-01-26 13:22:11.729 CWD /
< 2016-01-26 13:22:11.729 250 HFS directory / is the current working directory
> 2016-01-26 13:22:11.729 MKD 'AUFTP01.'
< 2016-01-26 13:22:11.729 550 error allocating AUFTP01.
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Copying files to remote side failed.
* 2016-01-26 13:22:11.729 (ExtException) **Copying files to remote side failed.**
* 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Asking user:
. 2016-01-26 13:22:11.729 Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''. ("Copying files to remote side failed.","CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)")
< 2016-01-26 13:22:11.729 Script: Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''.
< 2016-01-26 13:22:11.729 Script: Copying files to remote side failed.
< 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
* 2016-01-26 13:22:11.729 (EScpSkipFile) Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''.
* 2016-01-26 13:22:11.729 Copying files to remote side failed.
* 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Script: Failed
. 2016-01-26 13:22:11.729 Script: Exit code: 1
. 2016-01-26 13:22:11.729 Disconnected from server
How can I upload this file in WinSCP?
Regards
Thorir
I'm trying to script upload of a file with WinSCP. I can upload the file with FileZilla but I can't upload the file in WinSCP (both the gui and scripted)
The file name is strange : 'RBP.AUVV.AUDKENNI.STARFCER' (and the ' is included in the name)
G:\Vefir\Umsoknir\Strengur>dir *STAR*
Directory of G:\Vefir\Umsoknir\Strengur
26.01.2016 09:38 1.277 'RBP.AUVV.AUDKENNI.STARFCER'
This is a FileZilla log:
2016-01-26 11:55:24 4556 3 Response: 234 Security environment established - ready for negotiation
2016-01-26 11:55:24 4556 3 Status: Initializing TLS...
2016-01-26 11:55:24 4556 3 Status: Verifying certificate...
2016-01-26 11:55:24 4556 3 Status: TLS connection established.
2016-01-26 11:55:24 4556 3 Command: USER auftp01
2016-01-26 11:55:24 4556 3 Response: 331 Send password please.
2016-01-26 11:55:24 4556 3 Command: PASS ********
2016-01-26 11:55:24 4556 3 Response: 230 AUFTP01 is logged on. Working directory is "AUFTP01.".
2016-01-26 11:55:24 4556 3 Status: Server does not support non-ASCII characters.
2016-01-26 11:55:24 4556 3 Command: PBSZ 0
2016-01-26 11:55:24 4556 3 Response: 200 Protection buffer size accepted
2016-01-26 11:55:24 4556 3 Command: PROT P
2016-01-26 11:55:24 4556 3 Response: 200 Data connection protection set to private
2016-01-26 11:55:24 4556 3 Status: Connected
2016-01-26 11:55:24 4556 3 Status: Starting upload of G:\Vefir\Umsoknir\Strengur\'RBP.AUVV.AUDKENNI.STARFCER'
2016-01-26 11:55:24 4556 3 Command: CWD 'AUFTP01.'
2016-01-26 11:55:24 4556 3 Response: 250 "AUFTP01." is the working directory name prefix.
2016-01-26 11:55:24 4556 3 Command: PWD
2016-01-26 11:55:24 4556 3 Response: 257 "'AUFTP01.'" is working directory.
2016-01-26 11:55:24 4556 3 Command: TYPE A
2016-01-26 11:55:24 4556 3 Response: 200 Representation type is Ascii NonPrint
2016-01-26 11:55:24 4556 3 Command: PASV
2016-01-26 11:55:24 4556 3 Response: 227 Entering Passive Mode (193,4,182,35,195,122)
2016-01-26 11:55:24 4556 3 Command: STOR 'RBP.AUVV.AUDKENNI.STARFCER'
2016-01-26 11:55:24 4556 3 Response: 125 Storing data set RBP.AUVV.AUDKENNI.STARFCER
2016-01-26 11:55:24 4556 3 Response: 250 Transfer completed successfully.
2016-01-26 11:55:24 4556 3 Status: File transfer successful, transferred 1.277 bytes in 1 second
2016-01-26 11:55:24 4556 3 Status: Retrieving directory listing of "'AUFTP01.'"...
2016-01-26 11:55:24 4556 3 Command: TYPE I
2016-01-26 11:55:24 4556 3 Response: 200 Representation type is Image
2016-01-26 11:55:24 4556 3 Command: PASV
2016-01-26 11:55:24 4556 3 Response: 227 Entering Passive Mode (193,4,182,35,195,122)
2016-01-26 11:55:24 4556 3 Command: LIST
2016-01-26 11:55:24 4556 3 Response: 550 No data sets found.
2016-01-26 11:55:24 4556 3 Status: Directory listing of "'AUFTP01.'" successful
But if I use WinSCP I can't upload it in gui, get:
Error transfering file 'G:\Vefir\Umsoknir\Strengur\'RBP.AUVV.AUDKENNI.STARFCER". (see problem with ' and ")
If I do it from a script, the put command: put 'RBP.AUVV.AUDKENNI.STARFCER' I get this:
> 2016-01-26 13:22:11.729 Script: put 'RBP.AUVV.AUDKENNI.STARFCER'
. 2016-01-26 13:22:11.729 Copying 1 files/directories to remote directory "'AUFTP01.'"
. 2016-01-26 13:22:11.729 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2016-01-26 13:22:11.729 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2016-01-26 13:22:11.729 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2016-01-26 13:22:11.729 File: ''RBP.AUVV.AUDKENNI.STARFCER'' [2016-01-26T09:38:50.466Z] [1277]
. 2016-01-26 13:22:11.729 Copying "'RBP.AUVV.AUDKENNI.STARFCER'" to remote directory started.
. 2016-01-26 13:22:11.729 Binary transfer mode selected.
. 2016-01-26 13:22:11.729 Starting upload of 'RBP.AUVV.AUDKENNI.STARFCER'
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x0594003D)
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
> 2016-01-26 13:22:11.729 CWD /
< 2016-01-26 13:22:11.729 250 HFS directory / is the current working directory
> 2016-01-26 13:22:11.729 MKD 'AUFTP01.'
< 2016-01-26 13:22:11.729 550 error allocating AUFTP01.
> 2016-01-26 13:22:11.729 CWD /'AUFTP01.'/
< 2016-01-26 13:22:11.729 550 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Copying files to remote side failed.
* 2016-01-26 13:22:11.729 (ExtException) **Copying files to remote side failed.**
* 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Asking user:
. 2016-01-26 13:22:11.729 Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''. ("Copying files to remote side failed.","CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)")
< 2016-01-26 13:22:11.729 Script: Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''.
< 2016-01-26 13:22:11.729 Script: Copying files to remote side failed.
< 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
* 2016-01-26 13:22:11.729 (EScpSkipFile) Error transferring file ''RBP.AUVV.AUDKENNI.STARFCER''.
* 2016-01-26 13:22:11.729 Copying files to remote side failed.
* 2016-01-26 13:22:11.729 CWD cmd failed : EDC5129I No such file or directory. (errno2=0x05190050)
. 2016-01-26 13:22:11.729 Script: Failed
. 2016-01-26 13:22:11.729 Script: Exit code: 1
. 2016-01-26 13:22:11.729 Disconnected from server
How can I upload this file in WinSCP?
Regards
Thorir