Page 1 of 1

Find not working

Posted: 25 Oct 2019 18:32
by Docfxit
I have a bat file with this code:

Code: Select all

type "%~dp0BootFixerTest.txt" |find /i "Windows installations: 0" >nul || goto :Done
Pause
This is the file called BootFixerTest.txt it's looking at:

Code: Select all

Scanning all disks for Windows installations.

Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully.
The bat file is going to Pause when it should goto Done.

What can I change so it will recognize "Windows installations: 0" and goto Done?

Thanks,
Docfxit

Re: Find not working

Posted: 26 Oct 2019 00:20
by bakemonogatari
your code works as expected, || acts like ELSE not AND

Re: Find not working

Posted: 26 Oct 2019 15:57
by Eureka!