Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

alerosmile

Great. Works for me. Thanks a lot!
martin

Re: External applications optional client path options

You can use !`...` pattern with embedded !K to execute a local command that takes a key path and outputs what you need based on it. For your scenario, simple if command of cmd would do. Like this:
!`cmd /c if not "!K"=="" echo -k !K`

https://winscp.net/eng/docs/custom_command#command
alerosmile

External applications optional client path options

For some sessions, I need to pass a private key file via command line to the external application (... -k !K). If the session does not have a private key configured, the application starts with the -k option alone. That application fails to start because the expected key file is not present on the command line. Is there a way to configure the terminal client path depending on whether the session has a key or not?

Thanks.