Doesnt append in remote server

Advertisement

dh
Joined:
Posts:
8

Doesnt append in remote server

I trying to append a small file in the remote server (NonStop Tandem Guardian server), but it doesn't.
It just overwrite it.

I tried many commands, but none of them worked:
put -append -nopermissions -nopreservetime -transfer="ascii" -resumesupport="off" -- "local_file" "remote_file",101
put -append -nopermissions -nopreservetime -transfer="ascii" -resumesupport="off" -- "local_file" "remote_file"
put -append -nopermissions -nopreservetime -transfer="ascii" -- "local_file" "remote_file"
put -append -nopermissions -preservetime -transfer="ascii" -- "local_file" "remote_file"
put -append -transfer="ascii" -- "local_file" "remote_file"

Please help me.

Reply with quote

Advertisement

dh
Joined:
Posts:
8

Re: Doesnt append in remote server

Yes, its SFTP.


TransferOptions transferOptions = new TransferOptions
{
TransferMode = TransferMode.Ascii,
FilePermissions = new FilePermissions { Octal = "0777" },
SpeedLimit = 8192,
OverwriteMode = OverwriteMode.Append,
PreserveTimestamp = false,
ResumeSupport = new TransferResumeSupport { State= TransferResumeSupportState.Off} ,
};

TransferOperationResult res3 = session.PutFiles(@"local_file", "remote_file", false, transferOptions).Check();
if (res3.IsSuccess)
{
Console.WriteLine("SUCCESS - TIME: {0}", end3.Subtract(start3));
}
else
{
SessionRemoteExceptionCollection erCol = res3.Failures;
foreach (SessionException er in erCol)
Console.WriteLine(er.Message);
}


martin wrote:

What protocol? The put -append works with SFTP protocol only.
See https://winscp.net/eng/docs/scriptcommand_put

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,504
Location:
Prague, Czechia

Re: Doesnt append in remote server

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. 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.

Reply with quote

dh
Joined:
Posts:
8

Re: Doesnt append in remote server

I trying it two times and the same results. I am attaching the SessionLog.


martin wrote:

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. 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.
  • SessionLog.txt (22.6 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Doesnt append in remote server

It looks like a bug in your SFTP server.

In WinSCP GUI, do you get overwrite confirmations, when overwriting an existing file?

Reply with quote

dh
Joined:
Posts:
8

Re: Doesnt append in remote server

Nope. It overwrite just fine in the WinSCP Tool.
How can i append in the WinSCP Tool to check if the SFTP server is the problem?




martin wrote:

It looks like a bug in your SFTP server.

In WinSCP GUI, do you get overwrite confirmations, when overwriting an existing file?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Doesnt append in remote server

dh wrote:

No confirmation message.
That's an indication of a server bug that prevents the -append from working.

Reply with quote

Advertisement

You can post new topics in this forum