Author  Posts 
Hi All so, not rally sure where to start with this... so please forgive the lack of any script in short i have around 100 csv's in one location, all of them have the same headers. The only column i am interested in is column L "ItemCount". in a perfect world i would like to total all cells in column L, create a new CSV with the file name of each CSV in one column then the result of the sum in another Quick link to how excel file looks – http://s33.photobucket.com/user/markpriorgtst/media/Capture_3.jpg.html As i say ideally i would like a file to look like Column A Column B hoping someone can point me in the right direction, thanks 

A little code golf for you. gci *.csv  % {[pscustomobject]@{total = ((importcsv $_).numbers  measure Sum).sum;csv = $_.name}} 

Hi Dan Legend ! gci "\\eurxmbs01\c$\tmpPFStats\*.csv"  % {[pscustomobject]@{total = ((importcsv $_).itemcount  measure Sum).sum;csv = $_.name}} thanks 1518 ASPT01.csv 

I found this article and it helped me...Question – how can I add the Totals together? 

I found this article and it helped me...Question – how can I add the Totals together? 
You must be logged in to reply to this topic.