Re: Put with switch "-append"
Thanks for letting us know!
SSH_FXF_EXCL flag, and overwrites the existing target file. Consider contacting the server provider/author. If you want me check further, please post level 2 log.
/loglevel=0
> 2024-12-30 09:25:11.704 Script: put -append -preservetime "timbacq.dat" "timbacq.dat"
. 2024-12-30 09:25:11.704 Copying 1 files/directories to remote directory "/in" - total size: 1.020
. 2024-12-30 09:25:11.704 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: timbacq.dat
. 2024-12-30 09:25:11.704 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; EncryptNewFiles: Yes; ExcludeHiddenFiles: No; ExcludeEmptyDirectories: No; InclM: ; ResumeL: 0
. 2024-12-30 09:25:11.704 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2024-12-30 09:25:11.710 File: 'timbacq.dat' [2024-12-27T09:54:41.227Z] [1020]
. 2024-12-30 09:25:11.710 Copying "timbacq.dat" to remote directory started.
. 2024-12-30 09:25:11.710 Binary transfer mode selected.
. 2024-12-30 09:25:11.710 Opening remote file.
/loglevel=-1
> 2024-12-27 12:53:09.254 Script: put -append -preservetime "timbacq.dat" "timbacq.dat"
. 2024-12-27 12:53:09.254 Copying 1 files/directories to remote directory "/in" - total size: 840
. 2024-12-27 12:53:09.254 File: 'timbacq.dat' [2024-12-27T09:55:01.919Z] [840]
. 2024-12-27 12:53:09.254 Copying "timbacq.dat" to remote directory started.
. 2024-12-27 12:53:09.318 Preserving timestamp [2024-12-27T09:55:01.000Z]
. 2024-12-27 12:53:09.558 Transfer done: 'timbacq.dat' => '/in/timbacq.dat' [840]
. 2024-12-27 12:53:09.558 Copying finished: Transferred: 840, Elapsed: 0:00:00, CPS: 2.763/s
-preservetime parameter which however does not affect the problem.
-append but there are no differences.
-append.
/log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.-append switch connected to the put operator inside a script.
rem Generate temporary script
(
echo open sftp://<user>@<url-sftp> -privatekey=%_pathKey%\<file>.ppk -hostkey="<privatekey>" -passphrase="<passphrase>"
echo lcd <localpath>
echo cd <remotepath>
echo put -append -preservetime "<file>" <file>"
echo put -nopreservetime "<file_fake_last_connection>" "<file_fake_last_connection>"
echo exit
) > script.tmp
rem Run temporary script
%_path%\winscp.com /ini=nul /log=%_path%\log\<file_log.log> /logsize=5*1M /loglevel=-1 /script=script.tmp
-append switch with the put command as per the documentation https://winscp.net/eng/docs/scriptcommand_put and https://winscp.net/eng/docs/scriptcommand_put#append.