Can the localPath in PutFiles() point to a remote filepath?

Advertisement

wildview
Joined:
Posts:
6
Location:
US

Can the localPath in PutFiles() point to a remote filepath?

Can the localPath in PutFiles() point to a remote SFTP filepath? Trying to append a .tmp file on the remote SFTP path to the same remote path w/ a different filename (see below). For some reason, it throws an error saying it can't find the file on the localPath, when it's clearly there. I think this should work. Any help would be greatly appreciated. Tnx.
localPath= "/Users/sftpuser/test.tmp"
remotePath= "/Users/sftpuser/test.csv"

Reply with quote

Advertisement

wildview
Joined:
Posts:
6
Location:
US

Re: Can the localPath in PutFiles() point to a remote filepath?

Thanks, but I don't want to duplicate a file on our SFTP, actually I'm trying to append to a current file on the SFTP remote server, that's why was trying to use the the PutFiles since the PutFile method w/ the transferOptions.OverwriteMode = OverwriteMode.Append, appears to be broken in the WinSCP latest build, it just overwrites the current file no matter what the transferOptions.OverwriteMode is set to even in SFTP mode. See the other ticket I have posted below. I can read in a file, append the data and write it back out, but that get's slow as the file grows, so I'd like to append w/ the PutFile() if it worked properly, is there anyway to resolve that problem? If not, I might have to look at using a another SFTP client that supports this functionality which I'd prefer not to if possible since everything else works fine. Let me know.

OverwriteMode.Append using PutFile on an SFTP server, doesn't appear to work

Reply with quote

martin
Site Admin
martin avatar

Re: Can the localPath in PutFiles() point to a remote filepath?

Ok, I see. Unfortunately, there's no good way now.

Reply with quote

Advertisement

You can post new topics in this forum