Guest User

Untitled

a guest
Oct 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. for /f "delims=:" %%a in ('findstr /n "AXX0000XXXA" "data.txt"') do (set find_line=%%a)
  4. set /a counter=0
  5. for /f "usebackq delims=" %%b in (`"findstr /n ^^ data.txt"`) do (
  6. set curr_line=%%b
  7. set /a counter=!counter!+1
  8. if !counter! equ !find_line! (
  9. type temp.txt >> target.txt
  10. )
  11. call :print_line curr_line
  12. )
  13. endlocal
  14.  
  15. :print_line
  16. setlocal enabledelayedexpansion
  17. set line=!%1!
  18. set line=!line:*:=!
  19. echo !line!>>target.txt
  20. endlocal
Add Comment
Please, Sign In to add comment