1.

Solve : batch script dies after first call to another different batch script?

Answer»

I have a script that basically calls another bunch of scripts in sequence. I don't care if any of them fail -- I want the script to continue.
Unfortunately, it is not. Can anything be done? Here is the basic gist:

CD C:\really\long\path\
clam

CD C:\another\really\long\path
clam

CD C:\yetanother\really\long\path
clam

After the first "clam", it just stops. "clam.bat" is a simple script that's stored in each directory with specific stuff to do.

Thanks,
use CALL clamthat was the first thing i tried to no avail.

do the clam.bat's call any other batch files?It would be helpful if you showed us the contents of 'clam', but in any case you need to use the 'call' statement if you expect a RETURN to the caller (the batch file you posted).

Code: [Select]CD /d "C:\really\long\path\"
call clam

CD /d "C:\another\really\long\path"
call clam

CD /d "C:\yetanother\really\long\path"
call clam

It might also be wise to turn echo on in 'clam' and any other batch files referenced. This will let you see how the file executes at all levels.

ok. i'll try the "CALL" thing and "ECHO ON" and POST the contents of clam.bat LATER today.
Right now -- i'm at my other job for the next 8 hours.

thanks for all the help everyone.ok -- turns out it was a nestled script call without the "CALL". Modified. Reran. Worked.

Thanks, all.Quote from: whale on MARCH 20, 2011, 11:49:23 AM

What is a "nestled script call?" Show the code and output.

"show the code and output"? When did he become responsible to answer questions after his problem has been solved? Especially when you are questioning the very piece of information that explains his problem.

nestled clearly means nested. I originally suspected one of the "nested" (batch files being called from the main batch) may have an ADDITIONAL batch call that wasn't using call, which is why I asked whether any of the said batches called additional batch files.

Then he discovered the issue so there was no reason to further pursue it.


Discussion

No Comment Found