Page 1 of 1

Option to escape semicolon in command line needed

Posted: 17.01.2026, 15:45
by HansS
I have favorite toolbar entry to start windows terminal in active or selected directory, but this does not work if directory name contains semicolon.

E.g. if you have a directory "D:\temp\a;b"
and toolbar entry:

Code: Select all

Name: wt cmd ActivSel
Program: wt.exe
Parameter: --window 0 new-tab --profile "Eingabeaufforderung" -d "%ActivDir%\%ActivItem%"
it does not work, and the cmd-syntax for replace is obviously not supported, command does not work at all with:

Code: Select all

"%ActivItem:;=\;%"
In the shell the command

Code: Select all

wt --window 0 new-tab --profile "Eingabeaufforderung" -d "D:\temp\a;b"
does not work either, but

Code: Select all

wt --window 0 new-tab --profile "Eingabeaufforderung" -d "D:\temp\a\;b"
or

Code: Select all

set "_temp=D:\temp\a;b"
wt --window 0 new-tab --profile "Eingabeaufforderung" -d "%_temp:;=\;%"
works.


FC 2026 Build 940 64-bit in Win11 25H2