DOS 62
Merge TXT files CMD By mike on 28th March 2021 03:46:11 PM
  1. @echo off
  2. set first=1
  3. >new.txt.tmp (
  4.   for %%F in (*.txt) do (
  5.     if defined first (
  6.       type "%%F"
  7.       set "first="
  8.     ) else more +1 "%%F"
  9.   )
  10. )
  11. ren new.txt.tmp merged.csv
  12. for /r %%a in (merged.csv) do for %%b in ("%%~dpa\.") do ren "%%~a" "%%~nxb%%~xa"

Hasta la pasta! is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.