Quantcast
Channel: Total Commander
Viewing all articles
Browse latest Browse all 3819

Total Commander (English) • Re: %P without backslash

$
0
0
This thread is a bit old :mrgreen: , but I just ran into the same problem.
By combining cmd-substrings and delayed environment variable expansion, I was able to produce the following native (Windows 10) one-liner:

Command:

Code:

cmd /V:ON /K
Parameters:

Code:

"set "ZZZZ=%T" && echo "target=%T" && echo "target_fixed=!ZZZZ:~0,-1!" && echo "source=%P%S""
This demo button produces a cmd.exe window with the following text:

Code:

"target=c:\Temp\2\""target_fixed=c:\Temp\2""source=c:\Temp\1"
A bit ugly, but it works.

Statistics: Posted by igor3v — 2024-08-13, 15:07 UTC



Viewing all articles
Browse latest Browse all 3819

Trending Articles