daily pastebin goal
69%
SHARE
TWEET

DOS Merge .txt Files

nerdgirl Jul 29th, 2011 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top