Reputation: 71
I am a powershell newbie and I need a script that does a write output to a delineated text file in powershell.
In sequence, this is what I would like to do in powershell:
I was able to figure out sequence 1 and 2 however I am stumped on (3).
Here is a snippet of what i am trying to do:
# Iterate through the dataset
foreach ($row in $ds.tables["location"].rows)
{
Out-file ?
}
Please help!
Upvotes: 1
Views: 2522
Reputation: 109100
$myData | Export-CSV -delimiter '|' -Path $MyFileName
Note, the Export-CSV
cmdlet will handle looping over the data, so no need for your own loop.
Upvotes: 3