Shruti Singh
Shruti Singh

Reputation: 200

Beyond Compare - via command Line : Spaces in FilePath

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.

Upvotes: 1

Views: 815

Answers (1)

Zoë Peterson
Zoë Peterson

Reputation: 13312

Since you're running a script but haven't shown that, I suspect you aren't quoting the arguments there properly. The quotes on the command line are going to be stripped as part of the command line processing, so if your script is:

file-report layout:side-by-side %1 %2 output-to:printer

It should actually be

file-report layout:side-by-side "%1" "%2" output-to:printer

Without the extra quotes the variables would be expanded like:

file-report layout:side-by-side File 1.xml File 2.xml output-to:printer

Upvotes: 5

Related Questions