I am wondering if it is possible to change CMD's window title to /?
I've tried using ^/?
, ^/^?
, and "/?"
but none of them seem to work.
Anyone got any suggestions?
Thanks
It's possible with adding some invisible characters.
The idea is taken from @npocmaka SO: How can I set set a title that start with coma,semicolon or equal sign?
The problem of a title with a starting comma it can be solved also with a LF character, but in your case the LF doesn't help anywhere in the string.
@echo off
(set LF=^
%=empty=%
)
::Create a FS variable
call :hexprint "0x1C" FS
title /%FS%?
exit /b
:hexPrint string [rtnVar]
for /f eol^=^%LF%%LF%^ delims^= %%A in (
'forfiles /p "%~dp0." /m "%~nx0" /c "cmd /c echo(%~1"'
) do if "%~2" neq "" (set %~2=%%A) else echo(%%A
exit /b
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With