Re: Return code to exit from a .bat file

2001-10-01 Thread Mbedish
Thanks, it worked or at least gave me an error and exited the batch file. The batch files are difficult to work out if there are a lot (I have 12 or more files to check) so I will probably do as you suggest (write a wrapper) once I have worked out how to do it, and then I can return the error

Re: Return code to exit from a .bat file

2001-10-01 Thread Brett W. McCoy
On Mon, 1 Oct 2001 [EMAIL PROTECTED] wrote: > I think my main problem is getting an eror out of perl which is > recognised by a .bat file. I have set a return code in the program > from a subroutine but it is not getting to the operating system. You should use 'exit' to return a value from a Per

Re: Return code to exit from a .bat file

2001-10-01 Thread Mbedish
I think my main problem is getting an eror out of perl which is recognised by a .bat file. I have set a return code in the program from a subroutine but it is not getting to the operating system. __SNIP__ while () { chomp; $length = length($_); if ($length != $lp) { print OU

Re: Return code to exit from a .bat file

2001-10-01 Thread Rajeev Rumale
You can use label and goto to achive this. create a lable end of the batch file. ": FILE_ERROR The check for the condition if it is false then use statement. "GOTO FILE_ERROR". This will send the cursor to last label. and will stop you can instert a echo command also after this. echo " Stopped