I'm trying to integrate Beyond Compare 3 with Total Commander. I've added 3 custom commands in the "Change start menu" with hotkeys, similar to the ones mentioned in this post: https://superuser.com/a/246127
I'm trying to make them work under any conditions: FTP, inside zip, files and folders with spaces. But I've got a corner case which I believe it is a bug or really inconsistent behavior. Here is what I've got:
The command tries to call Beyond Compare for the selected file on the left pane vs the selected file on the right pane.
Code: Select all
Command: C:\Programs\Beyond Compare 3\BCompare.exe
Parameters: %Z "%X%p\"%X%n "%X%t\"%X%m
Code: Select all
Left pane: d:\Downloads\Foo\readme.txt
Right pane: d:\Downloads\Bar\Sample Tokyo Map.bld
The result command parameters are (using ? parameter):
"d:\Downloads\Foo\\"readme.txt "d:\Downloads\Bar\\"Sample Tokyo Map.bld
Note that the "Sample Tokyo Map.bld" is not in quotes, but it has spaces so it breaks the functionality.
The same succeeds if the right pane is active. This is the resulting parameters:
"d:\Downloads\Foo\\"readme.txt "d:\Downloads\Bar\\""Sample Tokyo Map.bld"
Note that the quotes are automatically added by Total Commander, not the pattern.
The help / documentation doesn't mention anything about this.
Total Commander version: 9.51 32-bit
PS: Can I just wish for % parameter that just gives the full path to the selected left / right / source / target file and wraps it properly in quotes if need and works for archives and ftp... cause I've had to do a lot of trial and error to get to that hacky pattern you see above?
Edit:
As mentioned below, this also doesn't work properly:
Code: Select all
Command Pattern:
%Z%X%P%N %Z%X%T%M
Setup:
Left pane: d:\Downloads\foo.zip\readme.txt
Right pane: d:\Downloads\bar.zip\Bar\README.txt
Result with active active left pane:
d:\Downloads\foo.zip\readme.txt README.txt
Result with active right pane:
d:\Downloads\foo.zip\readme.txt d:\Downloads\bar.zip\Bar\README.txt