Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

Windows batch: search file on a folder

Hello experts,
I am looking for the fastest way in windows batch to find locations of files with specific string recursively based on a reported folder and export result as txt file.
Thank you very much.
Avatar of Bill Prew
Bill Prew

Are you looking for the string in the file name, or in the file content?

If in file name then couple be as simple as:

dir /b /s /a-d "c:\basedir\*string*.*" > "c:\temp\results.txt"

If in file content, then what type of files need to be searched, just TXT, or other?


»bp
Best to explain what you are after exactly with a simple example.
Avatar of Luis Diaz

ASKER

Thank you for your comments.
Search all  files which finish with .sql at : C:\Users\SQL Server Management Studio
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It works.
Thank you again for your help!