Ruuning Beyond Compare via commandLine with spaces in my filePath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shruti.soni99@gmail.com
    New User
    • Aug 2015
    • 1

    Ruuning Beyond Compare via commandLine with spaces in my filePath

    Hi, I am using Beyond Compare 4 on a 64-bit windows 7 enterprise SP1 machine

    I am trying to run beyond compare via command line.

    The command I am using is :

    BCompare.exe @"My Config File.txt" "File 1.xml" "File 2.xml"
    But this is not working because of spaces in the file Names.

    Beyond Compare shows a "file not found" error (as it is looking only for the part of fileName before spaces)

    If I compare files without any space in file name, it works.

    Also, the configuration given in "My Config File.txt " are read correctly. The issue is with Spaces in filenames for files to be compared.

    Pls help



    Thanks and Regards,
    Shruti
  • Aaron
    Team Scooter
    • Oct 2007
    • 16001

    #2
    Hello,

    The Windows Command line works with quotes, so as long as "file 1.xml" is in the same directory you are calling, this should work. Or the full path:
    bcompare.exe "@c:\config.txt" "c:\file 1.txt" "c:\folder\file 2.txt"

    Within config.txt, you would also need to use quotes around the variables, as the Windows command line does not pass in the " characters:
    "%1" and "%2"
    Aaron P Scooter Software

    Comment

    Working...