Created
February 20, 2014 18:22
-
-
Save shawngraham/9120038 to your computer and use it in GitHub Desktop.
combine text files into a single csv - after http://stackoverflow.com/questions/20963773/reading-lines-from-txt-file-into-csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
if exist result.csv del result.csv | |
for %%f in (*.txt) do ( | |
set i=0 | |
for /F "delims=" %%l in (%%f) do ( | |
set /A i+=1 | |
set line!i!=%%l | |
) | |
echo %%f, !line1!, !line2!, >> result.csv | |
) |
That's a very good question. I'm not sure how to do that, but it shouldn't be too hard, one would imagine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I want to combine arabic text. So could you please tell me how I can convert final result file to be in UTF-8 format. With your script it is saving in ANSI and am getting a garbage file at the end.
Thanks