Need to know the status of BAT file execution

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
paulwintech
Posts: 3
Joined: 07 Jul 2010 06:42

Need to know the status of BAT file execution

#1 Post by paulwintech » 07 Jul 2010 06:57

Hi,

I have a batch file which executes the command(for eg:- CVS update). My question is as follow

1. How to know that CVS update command in bat file is executed successfully.

2. After successful execution only - it need to execute the next line.

3. Whether success OR failure a log file need to be created in specified path.

4. In that log path i need to write details like 'date/time and result of my batch command"

5. I call this batch file from a utility, In that utility i have several batch files waiting to be executed subsequently. After the successful execution of batch1 - It then need to execute the next batch2. Batch1 may take some time, Till then batch2 should wait and then after completion of batch1 it should execute batch2.

Please help in this queries... I have googled and found nil result relate to my issue.

Thanks
Paulwintech

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Need to know the status of BAT file execution

#2 Post by aGerman » 07 Jul 2010 11:08

I've realy no idea of CVS, but the majority of commands return an ERRORLEVEL.
You could place that directly below the CVS command line:

Code: Select all

if errorlevel 1 (
  echo Something was going wrong.
) else (
  echo Everything is OK.
)


Regards
aGerman

Post Reply