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

martin

Re: RE(Solved): Custom Command execution - basic local Windows OS command - not working?

Thanks for sharing your solution.
CoreyO

RE(Solved): Custom Command execution - basic local Windows OS command - not working?

You cannot run shell commands without the shell itself(cmd.exe)!
Running stand-alone apps, like Notepad, etc, don't require a shell, so they can be run directly.
To run a shell command in Windows, use the following code:
cmd /C <command> <args>

For example, to run the referenced "copy" command, use this:
cmd /C copy "!" "!.backup"

Hope this helps someone else ;)
To WinSCP team: Executing local OS shell commands isn't covered in your official documentation(at least from my searches of it). Please consider adding this important topic to your Custom Command documentation. Thanks!
CoreyO

Custom Command execution - basic local Windows OS command - not working?

Not able to execute simple Windows shell commands on a selected local file. See attached image for full steps to create issue.
Ex1: Doesn't work..
copy "!" "!.backup"

Ex2: Does work..
notepad "!"

Please advise.
Thanks ;)