Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Docfxit
- Posts: 132
- Joined: 12 Nov 2015 12:42
#1
Post
by Docfxit » 31 Jan 2019 11:38
I am writing out a file and trying to find some text in the file. It isn't finding the text.
Code: Select all
Bootrec /scanos >"%~dp0BootFixerTest.txt"
type "%~dp0BootFixerTest.txt" |find /i "Windows installations: 0" >nul || goto :Done
Pause
:Done
The file has in it:
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.
I would like it to go to Done but it doesn't.
Docfxit
Last edited by
Docfxit on 31 Jan 2019 16:04, edited 2 times in total.
-
Squashman
- Expert
- Posts: 4486
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 31 Jan 2019 15:53
The code snippet and input example you provided works as provided. Must be something you are not showing us.
-
Docfxit
- Posts: 132
- Joined: 12 Nov 2015 12:42
#3
Post
by Docfxit » 31 Jan 2019 16:04
Thank you for taking a look at it.
The only thing I have is a pause after the line. (I have added the pause in my example)
The script goes to the pause instead of going to Done.
Thanks,
Docfxit
-
Docfxit
- Posts: 132
- Joined: 12 Nov 2015 12:42
#5
Post
by Docfxit » 31 Jan 2019 17:23
That's supper. That fixed it for me.
It's really great of you to point out what is / should happen.
Thank you very much,
Docfxit