Command Propmt Issue

Hi Friends :smiley:

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 :smiley:

cheers :smiley:

Happy learning :smiley:

2 Likes

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…

3 Likes

Sorry @Raghavendraprasad
I didn’t get well your answer.My apologies how can i know if the process is done?

Thanks in advance.

cheers :smiley:

Happy learning :smiley:

3 Likes

Sure let me break it down.

  1. Get all processes (activity)
  2. Loop through the processes list from the output of the first step.
  3. match the process name in the list and see whether it exists
  4. Repeat 1, 2 and 3 until the process doesn’t exist anymore.
  5. Launch your command line which is next in queue. :slight_smile:
3 Likes

Hi Patty,
you can do two things:

  1. 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.
  2. 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 :slight_smile:

BR
/Klaus

3 Likes

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 :smiley:

cheers :smiley:

Happy learning :smiley:

4 Likes

Hi @Raghavendraprasad

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.

2 Likes

Hi @KlausA

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 ?

2 Likes

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.
BR
/Klaus

2 Likes

@KlausA

Many thanks for your effort . What I just did is to combine the command.
to get the value.

cheers :smiley:

Happy learning :smiley:

2 Likes