I want a command to search for a file in a directory and all sub directories in windows, I saw all the Commands but I couldn't find any command to do this issue!

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

At prompt type:

dir /S /P "Path\FileName"

If you want to save the results in a text file:

dir /S "Path\FileName" > "Path\ResultFilename"

link|improve this answer
If the file is hidden or a system file you might want to also include the /a parameter as well! 8-) – Richard Aug 18 '10 at 7:28
feedback

use the /b switch to dir to print full path might be helpful. say, C:\ > dir /b /s *file*.*

still, you can filter the result with find or for, and redirect output to file with >filename

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.