Topic "can I execute custom commands without getting the 'executing custom command' message"

Author Message
jrbrown00
[View user's profile]

Joined: 2016-05-25
Posts: 6
Location: Chicago
I use winscp to call BeyondCompare, but whenever I am comparing a Local file to a remote file, I see the 'executing custom command' message, which locks me out of doing anything else. Can I avoid this so that I can still manipulate files via WinSCP while the remote command is executing, like a background process, maybe?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Use the start command to prevent that.

See https://winscp.net/eng/docs/guide_custom_commands_automation#general_hints
jrbrown00
[View user's profile]

Joined: 2016-05-25
Posts: 6
Location: Chicago
When I added "cmd.exe /c start " to the front of my command, winSCP invoked Textpad against the files I was trying to compare. Here is my command string

cmd /c start "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "!" "!^!" &
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The correct syntax is:

cmd /c start "" "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "!" "!^!" &
jrbrown00
[View user's profile]

Joined: 2016-05-25
Posts: 6
Location: Chicago
now the command executes without displaying the custom command message, but the remote screen is always blank, like it does not know where to find the source. If I run the command without 'start', the compare works normally. I have several tabs open, so perhaps it does not know which remote session to use for the compare? Two images are attached from running with and without 'start'. The temporary file names are pointing to different folders
beyondCompare2_populated_remote.JPG (147.86 KB) [Download]

Description: (none)

beyondCompare1_blank_remote.JPG (151.08 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Because WinSCP manages to delete the local temporary copy before BC reads it.

You have to workaround it somehow:

- wait a bit before exiting the command, like cmd /c start "" "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "!" "!^!" & timeout /t 3
- copy the file elsewhere and compare the copy
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License