Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

mickyg

Hi Martin,

Has there been any progress on adding these features to the .Net assembly?

Thanks
martin

Not yet.
mickyg

Hi Martin,

Has there been any progress on adding these features to the .Net assembly?

Thanks
martin

That's one of the options. But that's also used for Session.SynchronizeDirectories, where appending does not make sense.
mickyg

Perhaps adding it to the TransferOptions class might be a better place?
martin

I will definitely add it to some future release. I'll just thing of a ,better interface than adding yet another argument to the function.
mickyg

Hi Prikryl,

Thanks for getting back to me so quickly with a suggested solution.

I'd love to contribute but after having a quick search around, besides the contributor license agreement, I couldn't find anything about how to contribute back to the project. I found that the WinSCP code is hosted on Sourceforge in a CVS repository but also on Github in a Git repository. Is there a particular route I should use or is it enough to just fork the project on Github and send you a pull request?

If you meant that I could just maintain my own copy of the code and patch it to add this append functionality after each official release, I'd personally prefer to avoid having to do that.

Alternatively (and without meaning to be cheeky) if it is a simple as your code snippet, could you not just add this feature to the next release?

Many thanks
martin

Re: Add append function in PutFiles when using .Net Assembly

Thanks for your suggestion.
We will definitely at these once there is a demand.

You can easily add append support yourself, the .NET assembly is open source:

public TransferOperationResult PutFiles(string localPath, string remotePath, bool remove = false, TransferOptions options = null, append = false)


    ...

    WriteCommand(
        string.Format(CultureInfo.InvariantCulture,
            "put {0} {1} {2} -- \"{3}\" \"{4}\"",
            BooleanSwitch(remove, "delete"), BooleanSwitch(append, "append"), options.ToSwitches(),
            Tools.ArgumentEscape(localPath), Tools.ArgumentEscape(remotePath)));
mickyg

Add append function in PutFiles when using .Net Assembly

Hi,

Are there any future plans to implement the functionality currently marked as "not supported" in the PutFiles method (see here: https://winscp.net/eng/docs/scriptcommand_put), i.e. the append, resume and neweronly switches.

If so, is there a timescale for this, if not, is there a reason why they won't be implemented?

Many thanks