I have been using the following command to try closing the notepad file "temp.txt" opened on the windows.
nircmd win close title "temp.txt"
But this command seems not to work. If I try the below code:
nircmd win close process notepad.exe
This will close all the notepad files opened.
So my question is why cant I close an instance of notepad based on the name of notepad windows using the title keyword? Is there any way to do this?