@echo off REM Command line fgrep.bat like Linux/unix fgrep set what= set which= if %2TRICK==TRICK goto ask goto domore :ask if %1TRICK==TRICK goto asklots set what=%1 goto askfilespec :asklots set /P what="Enter strings to search for placed into double quotes, please " :askfilespec set /P which="Enter filespec to search for strings above, in " goto doit :domore if %1TRICK==TRICK goto doit set which=%1 shift if %1TRICK==TRICK goto domore if %what%TRICK==TRICK goto firstgo set what=%what% %which% goto domore :firstgo set what=%which% goto domore :doit REM echo which=%which% what=%what% for %%i in (%which%) do find %what% %%i exit