Solved

Scanning for text in flat files

Posted on 2007-11-14
2
233 Views
Last Modified: 2010-04-23
I need to scan all the files in C:\MyFiles, look in each file for the text "XX4567" and then create a log file that displays which files included the text. These are for the most part small text/ASCII files. Thanks!
0
Comment
Question by:MuddyMojo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 20281548
With 'grep.exe' from http://unxutils.sourceforge.net/ you can just use

grep XX4567 c:\MyFiles\*.txt > filelist.txt

where 'filelist.txt' will then contain a list of all files that contain the search string.
0
 

Author Comment

by:MuddyMojo
ID: 20281773
For Windows I actually used: http://pages.interlog.com/~tcharron/grep.html

Worked great with no actual Windows install - Just copy file in! Would never have found it without you suggesting using grep in the first place so THANK YOU!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Simple Linear Regression

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question