Search found 3 matches

by jerry8989
31 Jul 2014 07:15
Forum: DOS Batch Forum
Topic: for loop with findstr going through multiple directories
Replies: 5
Views: 4698

Re: for loop with findstr going through multiple directories

dbenham, Thank you again for your help. I was able to figure out my issue by doing the following: Set _OutFile=c:\temp\temp.txt If Exist "%_OutFile%" Del "%_OutFile%" For /F "Tokens=* Delims=" %%I In ('Dir /A-D /B /S "c:\temp\*.log"') Do ( (Echo. Echo.%%~I Ech...
by jerry8989
31 Jul 2014 06:45
Forum: DOS Batch Forum
Topic: for loop with findstr going through multiple directories
Replies: 5
Views: 4698

Re: for loop with findstr going through multiple directories

dbenham, thank you for your reply. The issue I'm having with FINDSTR is that it will put the full file path first then the line that the word is found on. I need to show the file that it is looking at one time then list all the lines that have the word below it. It would need to do that for each fil...
by jerry8989
30 Jul 2014 14:34
Forum: DOS Batch Forum
Topic: for loop with findstr going through multiple directories
Replies: 5
Views: 4698

for loop with findstr going through multiple directories

Hello, I'm trying to find a way to create a batch file that will cycle through text files in the directory I set plus it's subdirectories. The word I'm searching for has to be the first word on the line. With the loop I need to print out the file name then below it any lines that have the word "...