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

Advertisement

CoreyO
Joined:
Posts:
2

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 ;)

Description: Full steps to create issue.

temp.png

Reply with quote

Advertisement

CoreyO
Joined:
Posts:
2

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!

Reply with quote

Advertisement

You can post new topics in this forum