Kirk, thx for reply. Screenshot is not necessary... custom command button config is very simple...
Command : "C:\Program Files\Camera Bits\Photo Mechanic All-in-One\Photo Mechanic.exe"
Parameter : %P
Icon : "C:\Program Files\Camera Bits\Photo Mechanic All-in-One\Photo Mechanic.exe"
I'm sure Total Commander is adding trailing backslash (\) every time. Tested with batch .bat script:
echo %1
I was wrong in my post.
PM will indeed show photos in "D:\PHOTOS" when using TC with %P
PM wil NOT show photos in "D:\MY PHOTOS" when using TC with %P
The difference is a space in folder's name
Just out of curiosity I tesed PM with Windows Shortcut (LNK):
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" D:\PHOTOS OK (no backslash, no space, no quotes)
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" D:\PHOTOS\ OK (backslash, no space, no quotes)
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\PHOTOS\" PM EMPTY (quotes + backslash, no space), works in TC
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\PHOTOS" OK (quotes, no space, no backslash)
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\MY PHOTOS" OK (space + quotes, no backslash)
"..\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\MY PHOTOS\" PM EMPTY (space + quotes + backslash)
Tested also with batch .bat script... this does not work, PM empty
start "" "C:\Program Files\Camera Bits\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\PHOTOS\"
start "" "C:\Program Files\Camera Bits\Photo Mechanic All-in-One\Photo Mechanic.exe" "D:\MY PHOTOS\"
Before I started this discussion, I used proxy exe program I wrote myself in Delphi inserted between TC and PM:
result := '"' + SysUtils.ExcludeTrailingPathDelimiter(s) + '"';
After digging some more I found a solution in this discussion within TC author's forum
https://ghisler.ch/board/viewtopic.php?p=422278#p422278The solution is a parameter written like that:
"%P:~0,-1"
Hope I did not take much of your time. Thanks for support and best regards.