No announcement yet.

WinSCP custom command

  • Filter
  • Time
  • Show
Clear All
new posts

  • WinSCP custom command


    I was looking for instructions for how to make a custom command for WinsSCP and found none. So i started playing around with the command line options and found that this works nicely:

    "C:\Program Files\Beyond Compare 3\BComp.exe" !&
    ...pretty simple. Works when selecting two or three files. Select one file also works but not useful. Select >3 also works but only three are compared.

    Thanks BC; your software continues to amaze (i just installed BC for Eclipse yesterday and WOW!).

  • #2
    Thanks! User submissions such as this are always appreciated.
    Aaron P Scooter Software


    • #3
      When using this command, BC come up and compares the files, but when I attempt to save one of the files, it does not propagate up through winscp and my changes appear in BC to be saved, but they are lost. I do not see attempt at activity (file xfer, etc.) in winScp when I do the save in BC.
      Do you know if there are other settings I should change to allow my saved changed to transfer back through winScp?


      • #4
        You'll have to take that up with the WinSCP developer. It's just downloading the content to temporary files and then launching BC with those. It would be up to them to notice that the files have changed and re-upload them.

        Alternatively, using Beyond Compare Pro, which supports SFTP natively.
        Zoë P Scooter Software


        • #5
          Hi, Did you ever find a solution to this problem? I am experiencing the same issue.

          If I open a file any any of my external editors and save, WinSCP detects the changed temp file and uploads, but whenever I use a custom command to launch Beyond Compare, the saved temp file is lost.

          It would be great to figure this out, but I'm not sure whether it's WinSCP or Beyond Compare that is causing the problem.

          Thanks for posting


          • #6
            Make sure you call bcomp.exe when launching Beyond Compare from WinSCP.

            This opens every compare and merge in a separate helper process, allowing version control to detect when the comparison is complete.

            If you use bcompare.exe, it opens all comparisons in a single process, so the launching application can't detect when the comparison is complete if you launch more than one diff.

            If you're using bcomp.exe and still seeing the problem, then you'll need to contact the makers of WinSCP for help or purchase Beyond Compare 3 Pro and use the SFTP support built into Beyond Compare.
            Chris K Scooter Software


            • #7

              Thanks very much for your response.

              I've tried using BComp.exe, but the result is the same -- WinSCP doesn't detect the changed temp file and upload back to the server.

              It appears this may be by-design, I've found this in the WinSCP docs:

              Local commands that are executed on the local machine with remote files downloaded to a temporary folder. It makes no sense for the command to modify the files, because they are not uploaded back after the command finishes. You must have remote files selected first in order to execute the command.


              Thanks for your assistance.


              • #8
                Originally posted by rgs258 View Post
                "C:\Program Files\Beyond Compare 3\BComp.exe" !&
                For anyone getting an error, make sure the 'Beyond Compare 3' portion of the path matches what you have installed, for example I'm on Beyond Compare 4


                • #9
                  This command seems to only where you want to compare two remote files. It doesn't work when one wants to compare local vs. remote file. In that cause use the following line:
                  "C:\Program Files\Beyond Compare 3\BComp.exe" "!" "!^!"