I am not really familiar with command line, so I met great difficulty in handling quoted and unquoted file name for its inconsistency, like this:
askparam.exe /u"path: %P%N" /t"path: %T%N" /p(e) cmd /k echo %001
askparam is a small tool written by MVV which allows user select predefined option in a GUI for command line tools. TC will automatic adding quote mark when the file name full path has space in it which will break existing /u and /t quote mark, even this tool provide a param like /q"`" to input double quote mark in other character, I can do nothing with TC added quote mark.
If an unquote %N is available, I can use below code to ensure it's properly quoted:
askparam.exe /q"`" /u"path:` %P%N`" /t"path: `%T%N`" /p(e) cmd /k echo %001
Please add unquote parameters for %N %S and so on.
Moderators: white, Hacker, petermad, Stefan2
Re: Please add unquote parameters for %N %S and so on.
I agree that quoting logic of TC parameter placeholders is a bit weird, and it would be much better to have two sets of placeholders (or maybe a set and a Q modifier, like in MultiArc), one always unquoted and another always quoted, and so for every single placeholder (P, N, T, M, S, *L etc). And it would be a really nice addition in TC 9.5.
But as for AskParam, you can use workarounds:
(fixed %T%O.%E)
But as for AskParam, you can use workarounds:
Code: Select all
AskParam.exe /u"path: "%P%N /t"path: "%T%N /p(he) cmd /k echo "%%001" -- adjacent quoted strings are concatenated
AskParam.exe /u"path: %P%O.%E" /t"path: %T%O.%E" /p(he) cmd /k echo "%%001" -- %O.%E is never quoted
Last edited by MVV on 2019-12-20, 12:10 UTC, edited 1 time in total.
- ghisler(Author)
- Site Admin
- Posts: 48097
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Please add unquote parameters for %N %S and so on.
%T%N%O.%E should be %T%O.%E
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Please add unquote parameters for %N %S and so on.
I think the first work-around would serveice most of my purpose. I'll use this tips if TC don't add unquoted placeholder in the end. Thanks.MVV wrote: ↑2019-12-17, 05:34 UTC I agree that quoting logic of TC parameter placeholders is a bit weird, and it would be much better to have two sets of placeholders (or maybe a set and a Q modifier, like in MultiArc), one always unquoted and another always quoted, and so for every single placeholder (P, N, T, M, S, *L etc). And it would be a really nice addition in TC 9.5.
But as for AskParam, you can use workarounds:Code: Select all
AskParam.exe /u"path: "%P%N /t"path: "%T%N /p(he) cmd /k echo "%%001" -- adjacent quoted strings are concatenated AskParam.exe /u"path: %P%O.%E" /t"path: %T%N%O.%E" /p(he) cmd /k echo "%%001" -- %O.%E is never quoted
The second will leave a "." if the item on the cursor is a folder.