PowerTip: Use PowerShell to Read Tab Delimited File

Doctor Scripto

Summary: Use Windows PowerShell to read a Tab delimited file.

Hey, Scripting Guy! Question How can I use Windows PowerShell to read a Tab delimited file?

Hey, Scripting Guy! Answer Use the Import-CSV cmdlet and specify a delimiter of `t, for example:

$a = Import-Csv -Delimiter "`t" -Path c:\fso\mytabfile.tsv

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • Russ Beinder 0

    It may have gotten mixed up in the rendering of this answer, but a grave (`) character must preceed the letter t; quotes are optional.
    $a = Import-Csv -Delimiter `t – Path c:\fso\mytabfile.tsv

Feedback usabilla icon