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".
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
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo(ARGS.Item(0) + " activated")
switch.vbs "<application name>"
Save this as switch.bat
@if (@a==@a) @end /*
cscript //E:JScript //nologo "%~f0" %*
REM --- Insert other batch codes here ---
// --- JScript codes below this line ----
var WshShell = WScript.CreateObject("WScript.Shell");
var ARGS = WScript.Arguments;
WScript.Echo(ARGS.Item(0) + " activated");
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