For example I have this folder "C:\Series"
and I have this script below which closes this folder when it is opened
@echo off
cd /d C:\ start C:\Windows\explorer.exe CD_Restored
rem Terminate process: taskkill /F /FI "WINDOWTITLE eq Music" /IM explorer.exe > nul
It works successfully, but when I open any folder inside it, this code surely doesn't work, and I need to close any opened folder inside it. I have over 15 subfolders inside it, so I can't make a script line for each of them, especially that I am always updating it. So could any one tell me how to make a script which closes a folder and its subfolders?