Batch script to search for a file in a folder

Closed
KRISH - Oct 18, 2008 at 03:02 AM
 batchdude - Nov 26, 2011 at 11:46 AM
Hello,
I want a batch script which finds for a filename(say "setup.lst" ) in all subfolders and print the folder name in which the file contains. Can anybody help me? its urgent.
Advance Thanks....
Related:

2 responses

well I have something defrent , I wanted to do the same thing I think ,
that's my batch :

@echo off
set pth=%*
cd %pth%
title Searching in %pth% and all sub directories .
:begin
set LF=
cls
echo ToExit - Don't Search [Hit ENTER]
set /p LF=Looking For :
if x%LF%==x goto eof
dir /s %LF%
echo.
echo Done.
pause>nul
goto begin
:eof
cls
echo Thank You .
pause>nul

and add to the registry : [HKEY_CLASSES_ROOT\Folder\shell\Search bat\command]
@="\"C:\\Program Files\\Search\\search.bat\" %1"

that's what I have , I use it all the time...
15
If I want to modify the batch to look for a certain file EVERY time I click it?
0