method 1 : With CMD(command prompt): TASKKILL /F /FI "WINDOWTITLE eq MYTITLEEEEEEEEEEEEEE" /IM explorer.exe(just change MYTITLEEEEEEEEEEEEEE with the opened folder's title [case-sensitive]) method 2 : open a new text document and enter this code: Set oShell = CreateObject("WScript.Shell")If oShell.AppActivate("YourWindowTITLEEEEEEEEEEEEE") ThenWScript.Sleep 100oShell.SendKeys "%{F4}"End If then save that file as yourfile.vbs and put to your desired path. Then run the Command: %windir%\system32\cmd.exe /C "START /WAIT CScript C:\ExampleFolder\yourfile.vbs //NoLogo" (note,that you should change "YourWindowTITLEEE" and "yourFileName.vbs" to whatever you want. Below is just an