Search found 8 matches

by susja
10 Apr 2011 07:57
Forum: DOS Batch Forum
Topic: How to avoid command termination
Replies: 6
Views: 6272

Re: How to avoid command termination

thanks for your help
by susja
09 Apr 2011 09:27
Forum: DOS Batch Forum
Topic: How to avoid command termination
Replies: 6
Views: 6272

Re: How to avoid command termination

Try call "%com1%" or start "" /wait "%com1%" But it depends on the program you've called whether an errorlevel is available and what it mean. It could be that the errorlevel is always 0 even if an error occurred and some command line tools (like robocopy) return errorl...
by susja
09 Apr 2011 05:52
Forum: DOS Batch Forum
Topic: How to avoid command termination
Replies: 6
Views: 6272

Re: How to avoid command termination

I don't know why because I don't know what com1 means. Is it a command line, another batch file or script, a third party tool ... Probably somewhere there you should search the reason if the batch processing interrupts. Regards aGerman hi aGerman, thanks for reply. I have no doubt that the problem ...
by susja
08 Apr 2011 20:45
Forum: DOS Batch Forum
Topic: How to avoid command termination
Replies: 6
Views: 6272

How to avoid command termination

Hello, I have a task: execute 2 commands: com1 and com2. I want that command com2 will be executed only if com1 succeeded. I use batch like this: @echo off set x=com1 %x% IF %ERRORLEVEL% NEQ 0 (EXIT) set y=com2 %y% The problem is that execution never get to line 'if' ... and check for condition. It ...
by susja
31 Mar 2011 11:00
Forum: DOS Batch Forum
Topic: Simple ping command doesn't stop
Replies: 0
Views: 5139

Simple ping command doesn't stop

Sorry for asking so stupid question ... but I'm stuck with it. I have a simple goal: put batch file in Windows Scheduler and run it every hour. The objective behind it is to keep firewall connection alive .. I expect that Scheduler will fire this batch, it'll run i.e. ping the system and exit. Simpl...
by susja
27 Nov 2009 13:09
Forum: DOS Batch Forum
Topic: Trap in a batch file
Replies: 4
Views: 12328

hi avery_larry,
I figured out how to change my "main" batch file to accommodate your way of solution. So please ignore my previous message.
I do appreciate your help and I learned something new from you.
Regards.
by susja
26 Nov 2009 21:54
Forum: DOS Batch Forum
Topic: Trap in a batch file
Replies: 4
Views: 12328

hi avery_larry, First thanks a lot for your reply. Second I love your idea. I thought that DOS has some feature similar to 'trap' on unix when it'll execute on signal but I could use 2 files as well. I tested your files and they work perfect. The issue is that it doesn't work with my batch file whic...
by susja
26 Nov 2009 10:59
Forum: DOS Batch Forum
Topic: Trap in a batch file
Replies: 4
Views: 12328

Trap in a batch file

Hello, Please help if you could .. I have a simple batch file which runs 2 jobs one after another. Sometime I have to interrupt the job because let say something wrong happened during of execution of my application. In that case I just terminate execution by Control + ^C and answer 'y'. After that I...