How can I use find string into recursive directories

How can I use find string into recursive directories

Post by eha » Sat, 12 Jul 2003 04:15:46



I want to update the sweep batch to make this search to subdirectories ?

find %f in (*.xtx) do find /I "string" %f

 
 
 

How can I use find string into recursive directories

Post by Ben Peddel » Tue, 15 Jul 2003 21:46:18



> I want to update the sweep batch to make this search to subdirectories ?

> find %f in (*.xtx) do find /I "string" %f

You need QBASIC to do this:

=== find1.bat ===
if "%1"=="find" goto find
dir /b/s *.xtx >find1.tmp
echo.open "find1.tmp" for input as #1 >find1.bas
echo.do while not eof(1) >>find1.bas
echo.    line input #1,a$ >>find1.bas
echo.    shell "find1 find "+a$ >>find1.bas
echo.loop >>find1.bas
echo.close >>find1.bas
echo.system >>find1.bas
qbasic /RUN find1.bas
del find1.bas
del find1.tmp
goto end
:find
find /I "string" %2
:end

 
 
 

How can I use find string into recursive directories

Post by Ted Davi » Wed, 16 Jul 2003 09:16:31



Quote:>I want to update the sweep batch to make this search to subdirectories ?

>find %f in (*.xtx) do find /I "string" %f

Just how many times do you want this question answered?  Please tell
us how many times, then when you reach that limit, quit asking it.

And each time you ask it, IDENTIFY THE OPERATING SYSTEM.


 
 
 

How can I use find string into recursive directories

Post by Charles Dy » Wed, 16 Jul 2003 12:00:36


On Mon, 14 Jul 2003 19:16:31 -0500, Ted Davis



>>I want to update the sweep batch to make this search to subdirectories ?

>>find %f in (*.xtx) do find /I "string" %f

>Just how many times do you want this question answered?  Please tell
>us how many times, then when you reach that limit, quit asking it.

>And each time you ask it, IDENTIFY THE OPERATING SYSTEM.

And the shell, please.  It's a good idea to include the output
of the VER command, or VER /R if that's supported, to make
your environment clear to others.

A 4DOS approach which should work on a wide variety of DOSses,
DOS-based and non-DOS-based operating systems, provided an
appropriate JP shell is installed:

   ffind /s /t"string" c:\where\*.txt

And another 4DOS approach, which launches the traditional
FIND.EXE utility while recursing through subdirectories:

   for /r c:\where %f in ( *.txt ) do find /i "string" %f

If plain DOS and COMMAND.COM, I'd either use a file-finder
capable of executing arbitrary commands against matches, or
else massage the output of DIR /S with sed to create a
secondary batch file.

--

 
 
 

How can I use find string into recursive directories

Post by Ted Davi » Tue, 22 Jul 2003 23:11:04


On Mon, 14 Jul 2003 19:16:31 -0500, Ted Davis



>>I want to update the sweep batch to make this search to subdirectories ?

>>find %f in (*.xtx) do find /I "string" %f

>Just how many times do you want this question answered?  Please tell
>us how many times, then when you reach that limit, quit asking it.

>And each time you ask it, IDENTIFY THE OPERATING SYSTEM.

Copied from an e-mail reply that should have been posted instead -

Quote:>My offical OS is win98 and I have c:\dos6.22 directory but not my offical OS .

The DOS 6.22 directory is essentially useless.

I have already given you two solutions to this problem that work in
Win9x: a sweep program and an awk script, both on 2003-07-10.


SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.

 
 
 

1. finding a string in a bunch of directories

Hi all,

Does anybody here still makes batchfiles ?

Anyway, I'm trying to help someone in another (local) ng who wants to find
strings in files on his hd, and it has to work in win 3, too.

I've gotten as far as this :

FOR %f IN (*.*) DO FIND "text" %f

This finds all occurrences of 'text' in all files in the current directory.
Is there any way I can do a recursive find on all subdirectories ?
Piping output from DIR /s /ad to FIND just finds all occurences of 'text' in
directory_names_

TIA

Chris

2. New Utilities : Mame 32 Tools and Rom Chopper

3. Trouble using comparisons w/ <string> (stdlib strings)

4. Purchasing a Palm V in the US for use in Australia

5. Recursive copy without coping directory structure

6. FSX author?

7. Please help! Recursive directory structure!

8. Search an Organizer

9. Need: Recursive directory search of all files for specified text

10. Recursive directory search of all files for specified text

11. Help: Removing recursive directories

12. Recursive Directory Search Algorithm

13. recursive directory deletion