Advertisement
nerdgirl

DOS Merge .txt Files

Jul 29th, 2011
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.35 KB | None | 0 0
  1. REM ## this is a nice little snippet that will take all of the files ending in .txt found inside the txts\ folder and merge them into 1 long text file. By Stacey Tipton Reiman www.akwebgenius.com/blog ##
  2.  
  3. @echo off
  4.  
  5. setlocal ENABLEDELAYEDEXPANSION
  6.  
  7. FOR %%f in (txts\*.txt) do (
  8. set fileout=mergedtext.txt
  9. type "%%f" >> !fileout!
  10. )
  11. )
  12. cls
  13. endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement