daily pastebin goal
10%
SHARE
TWEET

DOS Merge .txt Files

nerdgirl Jul 29th, 2011 149 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top