Search found 23 matches

by mjfoxtrot
04 Jun 2014 12:58
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Yep, changing the tokens to 2 took care of everything. Fabulous. Here's a sample of the output: .\split\split01.txt: NATIONAL LEAGUE STANDINGS .\split\split02.txt: NATIONAL TEAM-by-TEAM RECORDS .\split\split03.txt: NATIONAL LEAGUE BATTING REPORT .\split\split04.txt: NATIONAL LEAGUE SCORING REPORT .\...
by mjfoxtrot
04 Jun 2014 07:14
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Ah, I see, now I get it. Yes, this works like a charm. The "***" in the raw files have spaces in front of them, but a quick grep pass-through can take care of that. I gave it a test run and everything looks perfect; the file name and path precedes the title header on all 48 files. Wow, doe...
by mjfoxtrot
03 Jun 2014 11:25
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Gave that a try and got the dreaded "I was unexpected at this time" error. My understanding is that is usually attributable to a missing "%" somewhere but I fiddled with a few different variations and nothing worked.
by mjfoxtrot
03 Jun 2014 04:15
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

One other quick thought on this: is it possible in the output file (in this case, TextID.txt) to add the name of the text file that each line was extracted from? In other words, if the line was extracted from split01.txt, the resulting line would be split01: ***** AMERICAN LEAGUE STANDINGS ***** I s...
by mjfoxtrot
02 Jun 2014 23:40
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Absolutely brilliant, Foxidrive. Your follow-up script also worked like a charm, except now it runs more than twice as fast. The first script took 17 seconds; this one took 7! Woo-hoo!

And thank you as well for the explanation. I appreciate the chance to be able to understand how the script works.
by mjfoxtrot
02 Jun 2014 22:02
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Thanks, Yuri, but for some reason, the variant you sent does not pick up the third line where it is supposed to. Here is an example of the TextID file it produces: ***** Indy Colts TEAM REPORT ***** ***** Acadia Black Fly TEAM REPORT ***** ***** AMERICAN LEAGUE STANDINGS ***** ***** AMERICAN TEAM-by...
by mjfoxtrot
02 Jun 2014 20:11
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

Re: "If - Then" needed for text searcher

Very nice, Foxidrive. It does what I need, although you are certainly right that it takes more time to run the scan. But hey, I couldn't figure it out, and now I have a solution thanks to you! Much appreciated. By any chance, could you walk me through how your change solved the problem? I am trying ...
by mjfoxtrot
02 Jun 2014 19:26
Forum: DOS Batch Forum
Topic: "If - Then" needed for text searcher
Replies: 14
Views: 2579

"If - Then" needed for text searcher

This is my first post on this board. I appreciate any help that someone can provide. I use a relatively simple batch script in conjunction with the excellent "findrepl.bat" script that I downloaded from DOS Tips. The end result is that the batch scripts will scan a folder containing 48 .tx...