Mass search

  • Thread starter Thread starter Sandra
  • Start date Start date
S

Sandra

I need a free method for searching for files like this:

I have a list of 25 order numbers. I need to search in 100's of small files
for the order numbers. Right now, I run Start/Search For Files and look for
the order number within the text of the file. This works but it takes me a
long time. Is there a way to do a search that takes in a list of orders,
searches for the files and tells me which files have which orders?
 
I need a free method for searching for files like this:
I have a list of 25 order numbers. I need to search in 100's of small files
for the order numbers. Right now, I run Start/Search For Files and look for
the order number within the text of the file. This works but it takes me a
long time. Is there a way to do a search that takes in a list of orders,
searches for the files and tells me which files have which orders?

Have you tried the Google desktop search software?

John Thomas Smith
http://www.direct2usales.com
http://www.pacifier.com/~jtsmith
 
Can't do that. The files are on several PCs in another town. I use Remote
Administrator to connect to the PCs. I also map drives to them.
 
I need a free method for searching for files like this:

I have a list of 25 order numbers. I need to search in 100's of small files
for the order numbers. Right now, I run Start/Search For Files and look for
the order number within the text of the file. This works but it takes me a
long time. Is there a way to do a search that takes in a list of orders,
searches for the files and tells me which files have which orders?


If you need to search all the .txt files in c:\folder for order numbers in the c:\anotherfolder\ordernumber.txt file:

SearchOrders c:\anotherfolder\ordernumber.txt c:\folder\*.txt

@echo off
if {%2}=={} @echo Syntax: SearchOrders OrdersFile Folder&goto :EOF
setlocal
set orders=%1
set folder=%2
if not exist %orders% @echo %orders% NOT found.&endlocal&goto:EOF
if not exist %folder% @echo %folder% NOT found.&endlocal&goto:EOF
for /f "Tokens=*" %%f in ('dir /s /b /a /a-d %folder%') do (
for /f "Tokens=*" %%a in ('type "%%f"^|findstr /L /I /G:%orders%') do (
@echo "%%f" contains %%a
)
)
endlocal

NOTE: I haven't tested this, but unless I made a typo, it should work.
 
This looks like it will do exactly what I need but not just yet.

It takes a long time to run and the result is this line over and over:
FINDSTR: Line 1 is too long.

It repeats that line maybe 150 times and in the middle of all those lines is
a line that says:
"C:\Program Files\datatrack\zipme.txt" contains 25005, 2582273, 4544444

I was searching for 454444.

It seems to find that file OK. I don't know why the FINDSTR message keeps
repeating or why it does not find the same data in other folders. I created
a test file that has data and it wasn't found.
And why would it search all directories?

Thanks a million!

Jerold Schulman said:
If you need to search all the .txt files in c:\folder for order numbers in
the c:\anotherfolder\ordernumber.txt file:
 
Sandra said:
This looks like it will do exactly what I need but not just yet.

It takes a long time to run and the result is this line over and over:
FINDSTR: Line 1 is too long.

It repeats that line maybe 150 times and in the middle of all those lines is
a line that says:
"C:\Program Files\datatrack\zipme.txt" contains 25005, 2582273, 4544444

I was searching for 454444.

It seems to find that file OK. I don't know why the FINDSTR message keeps
repeating or why it does not find the same data in other folders. I created
a test file that has data and it wasn't found.
And why would it search all directories?

There is a freeware tool called "Grep" that is far superior to
FindStr.

Others have built on Grep to make shareware/payware versions.

Use download grep in your favourite search engine.
 
Back
Top