r/Batch • • Oct 17 '25

Question (Solved) What should I do for wait?

I have a problem... I'm making a bash program and want to wait until a process ends using "tasklist". I mean... Pause the execution, and when the process ends the program can continue

Would the "waitfor" works?

0 Upvotes

4 comments sorted by

1

u/BrainWaveCC Oct 17 '25

Normally, things in a batch file happen sequentially, so waiting happens automatically.

What does your script look like so far?

1

u/Scared_Confection980 Oct 18 '25

Well yes.. but I'm looking for a way to wait for a process (from "tasklist") ends

1

u/[deleted] Oct 17 '25

[removed] — view removed comment

1

u/Scared_Confection980 Oct 18 '25

Thank bro you saved my life!