Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows NT / Applications / September 2003

Tip: Looking for answers? Try searching our database.

How do I enhance the 'Find: All Files' application to allow for batch

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Orchard - 04 Sep 2003 02:44 GMT
Here's what I want to do:
1. Specify an input batch file containing 16 character-
long, alphanumeric text strings. The batch file could
contain anywhere from one to hundreds of these text
strings.
2. Use the 'Find: All Files' application to not only find
the files, but to copy the ENTIRE line, within each file,
to an output text file.

Is there a program around that finds for a specified input
batch and then sends the results to an output file? At the
moment, I can only use the 'Find: All Files' to search one
text string at a time, and then I have to go into each
file to copy the data out - too slow!

Or do I need to write my own program in, say, Visual Basic?

I plan to run this on a Windows NT 4.0 workstation.

Thanks.
Phil Robyn - 04 Sep 2003 08:59 GMT
> Here's what I want to do:
> 1. Specify an input batch file containing 16 character-
[quoted text clipped - 16 lines]
>
> Thanks.

Don't use 'Find: All Files'.  Just use a batch file:

@echo off
setlocal
type nul > c:\yourpath\searchresults.txt
for /f "tokens=*" %%a in (c:\somedir\yoursearchstrings.txt) do (
  findstr /i /c:"%%a" c:\somefolder\*.* >> c:\yourpath\searchresults.txt
)

Put the 16-character alphanumeric text strings (however many you
might have) in file 'c:\somedir\yoursearchstrings.txt'. Change the
file names and directory names per your requirements.

Signature

Phil Robyn
Univ. of California, Berkeley

u n z i p   m y   a d d r e s s   t o   s e n d   e - m a i l

Chris Orchard - 22 Sep 2003 03:10 GMT
Many thanks to Phil Robyn. It is much appreciated.

I have also been able to solve my problem using the
command FINDSTR at the NT Command Prompt.

Cheers!

Chris Orchard.

>-----Original Message-----
>
[quoted text clipped - 31 lines]
>might have) in file 'c:\somedir\yoursearchstrings.txt'. Change the
>file names and directory names per your requirements.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.