Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there a way to make the DOS Find command also search all subfolders of the starting directory you give it? I don't know DOS that well. I am looking to do this because I have Windows XP and the find-text-in-files facility in that doesn't work and won't be fixed till Service Pack 1 comes out later this year. I have downloaded some free globabl search-and-replace programs, but what I have looked at so far is awkward when you just want to simply find without replacing and see a list of just the files found (instead of a log of all 3,500 files it searched). Thanks - Mike

If you mean, just searching at a filename (and *NOT* the contents) you can use the regular 'dir' command with the extension '/s' :
- start from the root of a disk, run : 'cd\'
- run : 'dir filename.exe /s'
this will look for the file 'filename.exe' in that drive, amongst ALL subdirs** If you mean, search INTO files, I don't know any easy way of doing that in dos
however, 'find' in unix can do something like that

Sounds like XFIND is just what you want. Visit Horst Schaeffer's Batch Pages and download his FIND 2.3 file. XFIND is in there.
HTH

or you can use
dir c:\*.bmp /s
to search the entire C drive without having to leave the directory you are in.

Use the /R switch from the FOR command (not avaliable out of NT systems):
FOR /R %a in (*.*) do FIND "STRING" %a
For more information, type "FOR /?"
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |