trouble to create custom command button

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
lalio
New Member
New Member
Posts: 1
Joined: 2023-11-26, 16:59 UTC

trouble to create custom command button

Post by *lalio »

Hi!

I'd like to merge a video and an audio, which are selected in the same panel, a file with ffmpeg using a custom tootlbar button.

In the command line is now:

Code: Select all

%COMSPEC% /K "%%ProgramFiles%%\ffmpeg\bin\ffmpeg.exe"
(%COMPSEC /k for debugging)
In the parameters line:

Code: Select all

 -i %P%C1 -i %P%C2 -c copy %P%C2:~0,-10.mkv
I get "The filename, directory name, or volume label syntax is incorrect." error.

Could please somebody help, how to correct my command?

Thank you!
User avatar
beb
Senior Member
Senior Member
Posts: 436
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: trouble to create custom command button

Post by *beb »

To begin with, there's no need to double %%; so %ProgramFiles% would be enough.

Secondly, %C1 and %C2 return the full names of the selected files, so there's no need to add a path (%P) there.

Finally, the below version might work:

Code: Select all

cmd=%COMSPEC% /k "%ProgramFiles%\ffmpeg\bin\ffmpeg.exe"
param=-i %C1 -i %C2 -c copy %C2:~0,-10.mkv
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Post Reply