Search found 2 matches

by isdigit
01 Sep 2010 09:52
Forum: DOS Batch Forum
Topic: Batch: if statement not working correctly - win x86 xp
Replies: 2
Views: 4478

Re: Batch: if statement not working correctly - win x86 xp

Yes, I now remember reading that.... Thanks for you assistance! Edit: Also, the ECHO right before the first if statement returns 0 so it will always go to method exit. I had to remove this part to make it completely functional: ::ECHO Error level: %errorlevel% %date% %time% >> C:\Mounting.txt if ERR...
by isdigit
01 Sep 2010 09:24
Forum: DOS Batch Forum
Topic: Batch: if statement not working correctly - win x86 xp
Replies: 2
Views: 4478

Batch: if statement not working correctly - win x86 xp

Hello, I am trying to use a batch file to automate mounting network drives. When the drive is not mounted to F:, net use returns 0 and it exits correctly. When it is already mounted, it returns 2 but my if statement is not working correctly. It never goes to the method retry. SET a = 0 @ECHO OFF ECH...