Guest User

Untitled

a guest
Sep 24th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.40 KB | Source Code | 0 0
  1. @echo off
  2.  
  3. :: Var
  4.   set last=0
  5.   set line=0
  6.   set dest="%~n1 + %~n2.txt"
  7.  
  8.  
  9. setlocal
  10. :nextline
  11.   call :writeline %1
  12.   call :writeline %2
  13.   set /A line+=1
  14.   if %last%==0 goto nextline
  15. endlocal
  16. goto :EOF
  17.  
  18.  
  19. :writeline
  20.   if %line%==0 (set "skip=") else (set "skip=skip=%line% ")
  21.   for /f "%skip%tokens=*" %%a in ('type %1') do (
  22.     echo %%a >> %dest%
  23.     exit /b
  24.   )
  25.   set last=1
  26.   exit /b
  27.  
Advertisement
Add Comment
Please, Sign In to add comment