I have a tab delimited .txt file that I’m simply loading into a variable but it’s like it’s not recognizing the tab and tossing everything in each row into the first column. The .txt file example is the following…
column1 column2 column3 column4 column5
1 2 3 4 5
2 5 4 6
4 4 6 4
4 5 6 4 6
And the PowerShell code is as follows…
$data = Import-Csv -Delimiter `t -Path C:\temp\testimport.txt<</strong>
<strong>$data | Format-Table</strong>
Any idea what the problem is? I thought `t was the correct switch for tab delimiting. Thanks in advance for any help on the issue.