• Advertisement
Sign in to follow this  

Batch file question

This topic is 4504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can you save and close a notepad window with a batch file? Can you close any application with a batch file?

Share this post


Link to post
Share on other sites
Advertisement
REM save and close notepad
SaveAndCloseNotepad.exe




REM You just have to write the code for SaveAndCloseNotepad.exe

Share this post


Link to post
Share on other sites
REM you could terminate forcefully (no save and close):

taskkill /F /IM notepad.exe

REM or with the "do you want to save" box:

taskkill /IM notepad.exe

REM /F argument forcefully closes
REM thats the best you can do i think without writing a
REM program to do it

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement