Computing.Net > Forums > Programming > batch file help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file help

Reply to Message Icon

Name: jds
Date: March 30, 2006 at 14:17:27 Pacific
OS: windowsXP
CPU/Ram: petium III/ram 256
Comment:

Hi,
Can anyone help me on this:
I plan to create 2 scripts.
1)first one is to open a window and then execute some other commands
2)As when first one finish it's job the window did not close itself so I want to create a script to kill the window use taskkill command. Since I don't know when the first job complete I'll write a marcker file at the end of first script. I want my second script check if the marcker file exist and then perform the kill job. Some thing like if "macker file" exist do (perform taskkil)
Please help me on how to write the second script.
Thanks a lot



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: March 30, 2006 at 23:58:09 Pacific
Reply:

Post your first one and let's see what it's doing.


If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: jds
Date: March 31, 2006 at 01:15:12 Pacific
Reply:

it is something like this:

script1 "test":
echo hello
notepad.exe
>jobdone -- marker file( need help here to create maker file)

script 2 kill:
if jobdone not exist go to end-- need help here
For /F "tokens=2" %%n in ('tasklist ^| Find "notepad.exe"') Do Set Task=%%n
TaskKill /PID %task%
Set Task=
echo hello I have kill the test

:end



0

Response Number 3
Name: Mechanix2Go
Date: March 31, 2006 at 01:21:16 Pacific
Reply:

"As when first one finish it's job the window did not close itself so I want to create a script to kill the window"

Unless you post the EXACT script, there's no way to tell why the window does not close.


If at first you don't succeed, you're about average.

M2


0

Response Number 4
Name: jds
Date: March 31, 2006 at 01:27:58 Pacific
Reply:

btw, I want to use window schedule tasks to make it auto started the first script and schedule the second one to kill the first one ( The first one is not auto complete itself) notepad is an example here. I actually use an unix appliaction called reflection. when it run, it will create a r2win.exe. I can see it from window task or from tasklist

Thanks, any help is appreciated


0

Response Number 5
Name: Subathra
Date: April 8, 2006 at 01:19:54 Pacific
Reply:

i want to assign a text file contents to a variable in my batch file
so that i will use the variable as paramater
for my further command


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file help

batch file help www.computing.net/answers/programming/batch-file-help/13830.html

Batch File Help www.computing.net/answers/programming/batch-file-help-/11464.html

batch file help www.computing.net/answers/programming/batch-file-help/190.html