Topic "Problems with .filepart within Commandline"

Author Message
BraunT
[View user's profile]

Joined: 2011-01-31
Posts: 2
Hi.
we are trying to send with WinSCP files to a server (to a bank) where it is not allowed to rename the files. So we have the problem, that WinSCP cannot rename the File.
We tried it then in dialog and it worked not, too.
We already have switched off the Option
Advanced options->Preferences->Environment->"Transfer resuming"

We stored the Options to WinSCP.ini and there the options with "resume" are:
...
[Configuration\Interface]
...
ConfirmResume=0
...
[Configuration\Interface\CopyParam]
...
ResumeSupport=1
ResumeThreshold=102400
...

We are working with WinSCP 4.2.7 and Windows2008

The call in commandline is
winscp.com /timeout=60 /privatekey=F:\Programme\putty_priv_key.ppk sfxp...

or
winscp.com /timeout=60 /ini=F:\Programme\WinSCP.ini /privatekey=F:\Programme\putty_priv_key.ppk sfxp.

The Error (with/without -appand) is:
winscp> put -nopermissions -nopreservetime -append TK*
TK-LSV-110128-TEST | 541 KiB | 861.2 KiB/s | binary | 100%
Transfer was succesfully finished, but temporary transfer file 'TK-LSV-110128-TEST.filepart' could not be renamed to target file name 'TK-LSV-110128-TEST'. If the problem persists, you may try to turn off transfer resume support.
General failure (server should provide error description).
Error code: 4
Error message from server (en): Failure
Request code: 18
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp> bye


In another internet documentation I found the hint:
In the menu choos,
Options and Preferrences
Under Transfer, select "Resume"
Under "Enable transfer resume for", select Disable
Under "Automatic Reconnect", disable "Automatic reconnect session, fi it breaks during transfer"

In our Installation I do not find under Tranfer "Resume".

How can we reach, that WinSCP dont try to rename the file?

Many thanks for your help

T.Braun
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Set Enable Transfer Resume/Transfer to Temporary Filename to Disable.
This should be reflected in INI file as
ResumeSupport=2
_________________
Martin Prikryl
BraunT
[View user's profile]

Joined: 2011-01-31
Posts: 2
prikryl wrote:
Set Enable Transfer Resume/Transfer to Temporary Filename to Disable.
This should be reflected in INI file as
ResumeSupport=2




Hi Martin,

it works - many thanks

Thomas
joperx

Guest


Hi Martin,

Can you please tell me how I can specify ResumeSupport=2 in .Net code? I am using the .NET/COM library but cannot find a way to do this. The SFTP folder that I am dropping files to pick any file that comes in immediately and seems to be picking up the .filepart files before they can be assembled later. I just want to disable "automatic resume support" - via .NET.

Please help.




BraunT wrote:
prikryl wrote:
Set Enable Transfer Resume/Transfer to Temporary Filename to Disable.
This should be reflected in INI file as
ResumeSupport=2




Hi Martin,

it works - many thanks

Thomas
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
joperx wrote:
Can you please tell me how I can specify ResumeSupport=2 in .Net code? I am using the .NET/COM library but cannot find a way to do this. The SFTP folder that I am dropping files to pick any file that comes in immediately and seems to be picking up the .filepart files before they can be assembled later. I just want to disable "automatic resume support" - via .NET.

Duplicate post:
https://winscp.net/forum/viewtopic.php?t=11139
_________________
Martin Prikryl
portiz

Guest


prikryl wrote:
Set Enable Transfer Resume/Transfer to Temporary Filename to Disable.
This should be reflected in INI file as
ResumeSupport=2


Hello, I'm using winscp 5.0.8. Can this property be set using the raw settings switch, e.g.,

-rawsettings ResumeSupport=2

I ask because I've scripted a file transfer like this. For weeks it has worked without issue, and I thought I was past the problem that the remote server had with .filepart extension. However, today the remote poller process the consumes the transferred file picked up the .filepart version. So, I must not be doing something right.

Thanks for any insight.

Paul
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
portiz wrote:
Hello, I'm using winscp 5.0.8. Can this property be set using the raw settings switch, e.g.,

-rawsettings ResumeSupport=2

EDIT:
No, ResumeSupport is not a session setting.
But you can use -resumesupport switch of file transfer commands (such as put):
https://winscp.net/eng/docs/scriptcommand_put

Last edited by martin on 2013-12-17; edited 1 time in total
Pandi

Guest


I used the big file on transfer and having used the rawsettings to resumesupport=2 but still the file is created with filepart in FTP server and failed to transsfer file.
Below given the log

. 2013-12-16 08:53:09.422 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2013-12-16 08:53:09.422 TM: B; ClAr: No; CPS: 0; InclM:
. 2013-12-16 08:53:09.422 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2013-12-16 08:53:09.422 File: "PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt"
. 2013-12-16 08:53:09.428 Copying "PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt" to remote directory started.
. 2013-12-16 08:53:09.429 Binary transfer mode selected.
. 2013-12-16 08:53:09.429 Checking existence of file.
> 2013-12-16 08:53:09.429 Type: SSH_FXP_LSTAT, Size: 64, Number: 263
< 2013-12-16 08:53:09.449 Type: SSH_FXP_STATUS, Size: 97, Number: 263
< 2013-12-16 08:53:09.449 Status code: 2
. 2013-12-16 08:53:09.449 Checking existence of partially transfered file.
> 2013-12-16 08:53:09.449 Type: SSH_FXP_LSTAT, Size: 73, Number: 519
< 2013-12-16 08:53:09.469 Type: SSH_FXP_STATUS, Size: 106, Number: 519
< 2013-12-16 08:53:09.469 Status code: 2
. 2013-12-16 08:53:09.469 Opening remote file.
> 2013-12-16 08:53:09.469 Type: SSH_FXP_OPEN, Size: 89, Number: 771
< 2013-12-16 08:53:09.519 Type: SSH_FXP_HANDLE, Size: 10, Number: 771
> 2013-12-16 08:53:09.519 Type: SSH_FXP_WRITE, Size: 4118, Number: 1286
. 2013-12-16 08:53:13.321 619 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2013-12-16 08:53:13.321 Type: SSH_FXP_CLOSE, Size: 10, Number: 80900
< 2013-12-16 08:53:13.326 Type: SSH_FXP_STATUS, Size: 49, Number: 80390
< 2013-12-16 08:53:13.336 Type: SSH_FXP_STATUS, Size: 49, Number: 80646
< 2013-12-16 08:53:13.354 Type: SSH_FXP_STATUS, Size: 40, Number: 80900
< 2013-12-16 08:53:13.354 Status code: 0
> 2013-12-16 08:53:13.354 Type: SSH_FXP_RENAME, Size: 132, Number: 81170
< 2013-12-16 08:53:13.457 Type: SSH_FXP_STATUS, Size: 31, Number: 81170
< 2013-12-16 08:53:13.457 Status code: 4, Message: 81170, Server: Event Error 45, Language:
* 2013-12-16 08:53:13.457 (ETerminal) General failure (server should provide error description).
* 2013-12-16 08:53:13.457 Error code: 4
* 2013-12-16 08:53:13.457 Error message from server: Event Error 45
* 2013-12-16 08:53:13.458 Request code: 18
. 2013-12-16 08:53:13.459 Asking user:
. 2013-12-16 08:53:13.459 Transfer was successfully finished, but temporary transfer file 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt.filepart' could not be renamed to target file name 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt'. If the problem persists, you may try to turn off transfer resume support. ("General failure (server should provide error description).
. 2013-12-16 08:53:13.459 Error code: 4
. 2013-12-16 08:53:13.459 Error message from server: Event Error 45
. 2013-12-16 08:53:13.459 Request code: 18")
< 2013-12-16 08:53:13.459 Script: Transfer was successfully finished, but temporary transfer file 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt.filepart' could not be renamed to target file name 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt'. If the problem persists, you may try to turn off transfer resume support.
< 2013-12-16 08:53:13.460 Script: General failure (server should provide error description).
< 2013-12-16 08:53:13.460 Error code: 4
< 2013-12-16 08:53:13.460 Error message from server: Event Error 45
< 2013-12-16 08:53:13.460 Request code: 18
* 2013-12-16 08:53:13.462 (EScpSkipFile) Transfer was successfully finished, but temporary transfer file 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt.filepart' could not be renamed to target file name 'PHR_DATA_INDICATOR_AHM_1_21 - Copy.TXt'. If the problem persists, you may try to turn off transfer resume support.
* 2013-12-16 08:53:13.462 General failure (server should provide error description).
* 2013-12-16 08:53:13.462 Error code: 4
* 2013-12-16 08:53:13.462 Error message from server: Event Error 45
* 2013-12-16 08:53:13.462 Request code: 18
. 2013-12-16 08:53:13.463 Script: Failed
. 2013-12-16 08:53:13.463 Script: Exit code: 1
. 2013-12-16 08:53:13.463 Closing connection.
. 2013-12-16 08:53:13.463 Sending special code: 12
. 2013-12-16 08:53:13.463 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Pandi wrote:
I used the big file on transfer and having used the rawsettings to resumesupport=2 but still the file is created with filepart in FTP server and failed to transsfer file.

My answer was wrong. See the edit above.
_________________
Martin Prikryl
Pandi

Guest


prikryl wrote:
Pandi wrote:
I used the big file on transfer and having used the rawsettings to resumesupport=2 but still the file is created with filepart in FTP server and failed to transsfer file.

My answer was wrong. See the edit above.


We fixed the issue, by creating a config(.INI) file with below commands
[Configuration\Interface\CopyParam]
ResumeSupport=2

And in script file as below to use the INI file to stop limit in file length and avoid filepart.
/ini="C:\Program Files (x86)\WinSCP\WinSCP.ini"

Now files are transfered without any issues.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Pandi wrote:
We fixed the issue, by creating a config(.INI) file with below commands
[Configuration\Interface\CopyParam]
ResumeSupport=2

And in script file as below to use the INI file to stop limit in file length and avoid filepart.
/ini="C:\Program Files (x86)\WinSCP\WinSCP.ini"

Now files are transfered without any issues.

That does too. But using -resumesupport switch is more straightforward (and supported/documented) solution.
_________________
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