locked
Collect data from multiple csv files and export to a different csv file RRS feed

  • Question

  • Hi guys, 

    Hope you can help me out. I'm pretty new to PowerShell, and I'm stuck with an assignment, so looking for help! 

    I have a folder with multiple .csv files. For each file in this folder I want to collect some date and with this data create a new row in a new .csv file. 

    The data this row should contain: 

    1. the filename (without extention) of the .csv file 

    2. the sum of all the data in the 3th column of the .csv file 

    I have been working with Measure-Object to generate the sum, and with Get-Item to collect the name of the file. 

    Also I've used a for each loop to do this for all the files, but it's still not working unfortunately. 

    Hopefully somebody knows what to do! 


    Monday, March 11, 2019 2:07 PM

All replies