Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Powershell import .csv to access database

$
0
0

I have an .csv file which is updating every date, Is it possible to import this .csv file to access database 2010? if yes, can someone help me to do add import the csv file into access database?

I am using the following script:

$rootfolder = "C:\temp\Test Skript"

$txtfilepath = Get-ChildItem -Path $rootfolder -Filter *.tsv

$data = ForEach ($file in $txtfilepath){

    Import-Csv -Path $file.FullName -Delimiter "`t"

}

$txtfilepath | Move-Item -Destination "C:\temp\Test Skript\behandlet"

$data | Export-Csv -NoTypeInformation -delimiter ";" -Path (Join-Path $rootfolder "output.csv") -Append -Force | Format-table

/Mo


Viewing all articles
Browse latest Browse all 6937

Trending Articles