Just came across a problem with command buttons and quotes. I have a batch file which I want to call from a button like this:
Code: Select all
mybatch.bat "%P" > "%P\outfile.txt"
If I put this whole command in the "Command" box, the %P Total Commander variable is not expanded but used litterally instead, and my batch file sees the first argument as "%P".
So I put
Code: Select all
mybatch.bat
Code: Select all
"%P" > "%P\outfile.txt"
For example, if my current dir is "C:\My Path", my batch file sees the first argument as "C:\My" and the second as "Path"" (with a trailing quote).
I tried various combinations of quotes, but found no way of giving a correctly quoted path argument to my batch file.