Iam not very familiar with powershell, I want to import csv data from multiple csv files in a directory. The files have the same structure, however I need to filter the output with a delimiter, because sadly all the data is compressed in one column.
I managed to import a single csv file with:
Import-Csv -Path C:\data\test.csv -Delimiter ‘;’ | select "Instance Name","Database ID","Database Name" .......
and successfully got a valid output in separate columns.
How can I actually pass multiple files one after another? After the import I want to export the data into MSSQL tables to work with it later on.
Thanks and BR, Patrick
Get-ChildItemi.e.foreach ($File in (Get-ChildItem -Path 'C:\data\*.csv')){Import-Csv $File -Delim ';' | Select-Object ....}