PowerTip: Use PowerShell to Read Tab Delimited File

PowerTip: Use PowerShell to Read Tab Delimited File

  • Comments 3
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Hey, Scripting guys,
    I'm new to powershell, I cant use this "'t" as delimiter value. It says that Can't convert to System.Char must be exactly one char long. Help me to use this back tick T!! Here is what I'm trying to do. Thanks

    Get-Process | ConvertTo-CSV -NoTypeInformation -Delimiter "'t"

  • Hey Avinasha it´s ` not ´.