rem for each line is the csv file, expand the template.txt file, replacing the %0 %1 etc markers in template.txt rem with the contents of the corresponding field. Template.txt may contain more than one line. rem glue the results together and write them to somefile.txt csvtemplate.jar somefile.csv template.txt