Create batchfile to find files and words

March 18, 2013 at 14:25:51
Specs: Windows Server 2008
Hi, I need to create a file that scans files on the filesystem, and if finds the file "web.config" so in this file will look for words such as "DEBUG=FALSE". If it finds it, then sends e-mail with the information where. Is this possible?

Thanks, George


See More: Create batchfile to find files and words

Report •

#1
March 18, 2013 at 19:41:20
@echo off>result & setlocal
(for /f "tokens=*" %%a in ('findstr /i /s /c:"debug=false"') do echo %%a)>result
if exist result (
blat -to abc@xyz -u myname -pw mypassword -bodyF result
)

Report •
Related Solutions


Ask Question