Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
phillid
- Posts: 109
- Joined: 03 Apr 2010 20:27
- Location: Wellington, New Zealand
-
Contact:
#1
Post
by phillid » 05 Nov 2010 01:07
Hiya. I have a text file called corncob.txt which is a massive english dictionary (no definitions of words) that has each word on a different line. What I want is to have a batch file that asks you what word in a crossword puzzle is needed. You would use the '?' wildcard for the letters that you don't know. How do I make a FOR loop sort through the corncob.txt and find all words that match the input for example you enter '?ook' and it would return the words 'book', 'cook', 'took', 'look' etc.
I still can't get my head around the batch's FOR loops
Please help me
Thanks a whole lot!
phillid
-
!k
- Expert
- Posts: 378
- Joined: 17 Oct 2009 08:30
- Location: Russia
#2
Post
by !k » 05 Nov 2010 07:27
findstr /be /r /c:".ook" corncob.txt
. means any symbol