Guest User

Untitled

a guest
Oct 20th, 2018
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2.  
  3. REM Comment out one of the following two lines with REM to control behaviour
  4. set "keywords=%*"  :: This line takes keywords from the command line
  5. REM set "keywords=myapp1 myapp2" :: This line hard-codes keywords
  6.  
  7. echo App keywords: %keywords%
  8. echo.
  9.  
  10. echo Deleting LOGS\*.txt
  11. del logs\*.txt
  12. echo.
  13.  
  14. for %%A in (%keywords%) do (
  15.   for /f "eol=: delims=" %%F in ('findstr /i /m "%%A"   *.prg') do (
  16.     echo Creating LOGS\%%~nF.TXT -- found keyword: %%A
  17.     copy /Y NUL logs\%%~nF.TXT
  18.     )
  19. )
Advertisement
Add Comment
Please, Sign In to add comment