Win CMD, batch files & DOS are command line (CLI) utilities, and if you're looking at switching application windows, you need scripts that work with GUI.
VBScript comes "installed by default in every desktop release of Microsoft Windows since Windows 98" and "gained support from Windows system administrators seeking an automation tool more powerful than the batch language".
JScript has been supported since then too, and has syntax similar to Javascript, "Microsoft's dialect of the ECMAScript".
Either VBS or JS codes can be inserted into & run from batch files, and hosted by either cscript (console) or wscript (window).
To "switch to an already open application" via Win CMD:
Save this as switch.vbs
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim ARGS
set ARGS=WScript.Arguments
WshShell.AppActivate(ARGS.Item(0))
WshShell.SendKeys("~")
WScript.Echo(ARGS.Item(0) + " activated")
WScript.Quit(0)
Then switch.vbs "<application name>"
or
Save this as switch.bat
@if (@a==@a) @end /*
cscript //E:JScript //nologo "%~f0" %*
REM --- Insert other batch codes here ---
exit /b
*/
// --- JScript codes below this line ----
var WshShell = WScript.CreateObject("WScript.Shell");
var ARGS = WScript.Arguments;
WshShell.AppActivate(ARGS.Item(0));
WshShell.SendKeys("~");
WScript.Echo(ARGS.Item(0) + " activated");
WScript.Quit(0);
Then run switch.bat "<application name>"
If you don't want to create a separate file like above solutions or download external programs like nircmd or nirsoft to run from Win CMD (ie. a solution that can be effected from Win CMD only ), then either echo to temp file then delete after calling, or store all commands in a variable then command the variable.
Tested in Win 10