Find not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Docfxit
Posts: 132
Joined: 12 Nov 2015 12:42

Find not working

#1 Post by Docfxit » 25 Oct 2019 18:32

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

bakemonogatari
Posts: 21
Joined: 08 Jul 2019 05:22

Re: Find not working

#2 Post by bakemonogatari » 26 Oct 2019 00:20

your code works as expected, || acts like ELSE not AND

Eureka!
Posts: 137
Joined: 25 Jul 2019 18:25

Re: Find not working

#3 Post by Eureka! » 26 Oct 2019 15:57


Post Reply