Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Comment out one of the following two lines with REM to control behaviour
- set "keywords=%*" :: This line takes keywords from the command line
- REM set "keywords=myapp1 myapp2" :: This line hard-codes keywords
- echo App keywords: %keywords%
- echo.
- echo Deleting LOGS\*.txt
- del logs\*.txt
- echo.
- for %%A in (%keywords%) do (
- for /f "eol=: delims=" %%F in ('findstr /i /m "%%A" *.prg') do (
- echo Creating LOGS\%%~nF.TXT -- found keyword: %%A
- copy /Y NUL logs\%%~nF.TXT
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment