Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file command help  (Read 4104 times)

0 Members and 1 Guest are viewing this topic.

5151991

  • Guest
Batch file command help
« on: February 04, 2008, 08:11:17 PM »
So what I'm wondering if there is any batch commands I can use to check if another batch file is currently running and if said batch file is actually running, close/exit it.
Thanks
PS Im kinda new to batch files so the more simple the commands the better.

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: Batch file command help
« Reply #1 on: February 05, 2008, 05:02:08 AM »
I don't think so.  Batch files run under control of the shell program (either cmd or command). A task list would only show that the shell is running.

Opening multiple shell windows produces a fresh copy of the shell program. There is no cross communication between the windows so even the mem command fails to turn up evidence of a executing batch file.

Perhaps there are some third party utilities that can hunt down the elusive batch file. :D
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Dias de verano

  • Guest
Re: Batch file command help
« Reply #2 on: February 05, 2008, 11:12:20 AM »
cmdow.exe will find a window by its title.


You can include a line like this in your batch file by using Windows built-in TITLE command.

TITLE id-me

This changes the window title to whatever you want

Then later in another shell window Cmdow can kill it if it exists

cmdow id-me && cmdow id-me /END





http://www.commandline.co.uk/cmdow/