PowerTip: Use PowerShell to Read Tab Delimited File

Dr 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

Comments are closed. Login to edit/delete your existing comments

  • Russ Beinder

    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