Hope my first post is relevant enough. I'm a newbie coder and this is as much a learning exercise as it is a favor for my girlfriend. She has test results from a device that outputs data to .csv in multiple (100+) files. the important data is the separate file names and one column of data. so we want:

Input -
data1 data2 data3
12341 23534 3454
32453 3454 4345

data1 data2 data3
35123 23456 5654
34234 7578 67854

Output -

*note, sorting would be bad. we don't want to sort. order in files is important*

I have gotten a wonderful little bash script to get this to work:


fileList=`ls inputdatafolder/`
for var in $fileList
	echo $var >> outputfolder/outputfile.csv
	cat testdata/$var | cut -d, -f2 >> outputfolder/outputfile.csv

The problem now is the workstation is (of course) Windows. So the question now is, what do I port this to so that it works on her environment?

Obvious answer is "install cygwin" but being a corporate machine that is/may not be, an option. Same goes for perl or python. Java may be possible as it is most common. I tried Batch for a short while and got no where useful even with Google's help. C++ seems like overkill but I have resources to go that route. Just no experience.

This seems like a common issue online but no one has a solid solution for such a restricted environment. A pointer in the right direction should be enough. I'll respond with my own solution(s) as I think of ideas.


Perhaps the for will work for you. That link has an example of how to split up the output of the ping command.

Edited 4 Years Ago by mike_2000_17: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.