locked
Combining csv files RRS feed

  • Question

  • Hi,

    I have no experience with PowerShell, however I've been tasked with merging two CSV files. The files involve remote computer information that is pulled from a computer list. One CSV file contains last user etc. the other is specific with hard drive information as some of these machines have multiple drives. I found a script that will combine CSV2 to the last column of CSV1.  The rows match perfectly however the script changes order of the columns in CSV2.  Is there a way to get this done without changing the column orders in CSV2?.

    James

    Wednesday, August 8, 2018 4:20 PM

All replies

  • You can convert the csv's to objects (import-csv), and then join them in some way, and then export back to csv.


    • Edited by JS2010 Wednesday, August 8, 2018 4:43 PM
    Wednesday, August 8, 2018 4:42 PM
  • I will give this a try..

    Thanks for timely response!

    Wednesday, August 8, 2018 4:50 PM