2

I have a very basic batch command to merge csv files together, however I need them merging so that the columns are side by side not continuing on. There will always be the same number of records on each file. This is the basic code I have so far:

COPY File1.csv + File2.csv CombinedFile.csv
user3361017
  • 61
  • 2
  • 11

1 Answers1

3

Try this:

@echo off
setlocal EnableDelayedExpansion

< File2.csv (
   for /F "delims=" %%a in (File1.csv) do (
      set /P line2=
      echo %%a,!line2!
   )
) > CombinedFile.csv
Matt Williamson
  • 6,947
  • 1
  • 23
  • 36