I Issue some command in the command prompt and it takes time to execute it.
My problem was I need to render another command again, How can I know in the command prompt that my command is already done? So that I can issue again another command.
Thanks in advance guys
Hi there @pattyricarte
Command prompt is a windows process so get all processes and check for the cmd process whether it has ended or not…
I didn’t get well your answer.My apologies how can i know if the process is done?
Thanks in advance.
Sure let me break it down.
- Get all processes (activity)
- Loop through the processes list from the output of the first step.
- match the process name in the list and see whether it exists
- Repeat 1, 2 and 3 until the process doesn’t exist anymore.
- Launch your command line which is next in queue.
you can do two things:
- Use Get Processes Activity to get a list of all currently running processes. Loop through them via For Each Activity and try to find your “command promp” or what it’s name might be. If found, then it’s still running. Pause and poll again.
- You can use the low-level approach of getting your first process to create a “done.txt” file in say TEMP when its done. have your second proces check for the presence of this file. If present the former process still runs. If not, then go ahead with the second process. Remember to delete the file afterwards
Hi @Raghavendraprasad, @KlausA
Thank’s for the swift response I really appreciated.
I will try these methods and once done i will notify you guys
I already try to Get Process activity and loop through the process list, But the problem was the process is always there because i’m using the command window. so i cannot launch the next command.
1.I used the Get Process Activity to get the list and loop through it, But the problem the command promt is still up so i cannot launch my queue command.
2.The problem here is how can i know if the first command that i execute is done ?
to put the queue command in the next line ?
If you run everything from/inside the same command-window that’s a bit tricky.
However, have a looke at this article:
It tells you how to use /wait and a neat trick with pipe, depending on your need.
Many thanks for your effort . What I just did is to combine the command.
to get the value.