I've done some basic work with powershell over the last year, but for some reason this is evading me. Any help would be appreciated.
I have a csv file that will have several hundred entries:
Path,Data,Files
\someserversomepath1,100,1
\someserversomepath2,150,4
\someserversomepath1,200,5
\someserversomepath3,450,8
\someserversomepath4,200,23
\someserversomepath1,350,2
\someserversomepath2,800,9
I'd like to have the powershell script parse through the file and produce a new csv with results that show the unique paths and summed data and files values. So from the above my expected results would be (preferrably sorted by largest data value):
Path,Data,Files
\someserversomepath2,950,9
\someserversomepath1,650,8
\someserversomepath3,450,8
\someserversomepath4,200,23
I've found several answers referring to summing a single column, but I haven't figured out it out for two columns yet. Any suggestions on both code and/or technique would be greatly appreciated. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…