Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Find a string in all subdirectories
Name: gino1 Date: February 18, 2003 at 16:39:43 Pacific OS: DOS 6.2/Win 2000 CPU/Ram: 486/586
Comment:
Hello!
I´d like to make a program (.bat) in which the user types a certain string and the program should search it in ALL Files from the current directory and it´s subdirectories, also showing the path were it finds it.
Name: Secret_Doom Date: February 19, 2003 at 09:36:46 Pacific
Reply:
The following script will do the task on Windows 2000 and XP.
@echo off if not "%1"=="" goto start echo. echo This batch script will look for a string on all the files echo from the current directory and its subdirectories. echo. echo Sintax: %0 string echo. goto eof :start for /R %%F in (*.*) do ( FIND "%1" < %%~sF > nul if not errorlevel=1 echo String found on %%~fF ) :eof
That script will FAIL on DOS6.22. The same task can be achieved on that OS, but much more work is involved.
Summary: Hello I would like to create a batch file (.bat) that allows to execute a program (DOS Executable) in all subdirectories. The DOS executable create a result file and it would be great to choose the n...
Summary: Dear friends, Could you please help me to solve my lack of expertise to know HOW to save or copy to a file (.txt)the results of a find/search for a string in all directories? For example, how I save t...