Skip to content

Instantly share code, notes, and snippets.

@shawngraham
Created February 20, 2014 18:22
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawngraham/9120038 to your computer and use it in GitHub Desktop.
Save shawngraham/9120038 to your computer and use it in GitHub Desktop.
@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
)
@shawngraham
Copy link
Author

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