Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
is there any command in Dos for searching a file by specifying a root folder and a part of file name as search string like normal windows search utility.thanx in advance
--nagki---

c:\>find /?
Searches for a text string in a file or files.FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]
/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.If a path is not specified, FIND searches the text typed at the prompt or piped from another command.
Does this help?
i_XpUser

Hi XpUser,
thanx for ur quick response..
But my requirement is different...
i don't want to search the text in files..
i want a search based on only file name and it's extension...
what i want is to list all .txt files in specified root folder with file names matching some string.--nagki---

Open Windows Explorer. Go to the folder you want to search in. Right click on it, and hit search. Then enter *.txt in the search for file name box and run the search. Be sure to go to Advanced Optionss and be sure search sub-folders is checked.

I don't recall DOS ever having such a function.
You might go into DOS and try "help dir" and see if some of the sorting switches might help you sort through things more easily.
Does anyone remember the command which lists all the dos commands?"Two roads diverged in a wood, and I - I took the one less travelled by, And that has made all the difference." Frost

Does anyone remember the command which lists all the dos commands?
I guess this may be it?
There's also a syntax tutor available at that site. Oh dear..I used to love DOS for years and have at first resisted Windows 3.0. Then my memory of DOS began to vanish....:-(
i_XpUser

Cheap and easy, just how I like them :O
Goto the folder you want to seach and enter this command. You can also use cd\ to goto the root of the drive so you can search an entire drive.
cd\
dir /s /b FILEYOUWANT.exeHope this helps,
Sandman
---------------
Which of the following is true?
A. God created man
B. Man created God

Glad I could help :)
Sandman
---------------
Which of the following is true?
A. God created man
B. Man created God

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

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