1

A complete newbie with PowerShell here. I need to export data as a tab-delimited file and it looks like Export-Csv is the utility to use. I can't figure out how to specify the tab character though. I have tried

Export-Csv -Delimiter \t

and

Export-Csv -Delimiter "\t"
Colin Wu
  • 611
  • 7
  • 25
  • 2
    Possible duplicate of [How do I type a TAB character in PowerShell?](https://stackoverflow.com/questions/20691068/how-do-i-type-a-tab-character-in-powershell) – BenH Aug 28 '17 at 13:39
  • You're using the wrong escape character. You need to specify the grave accent in double-quotes (so it's not interpreted as a string literal). `"\`t"` – Maximilian Burszley Aug 28 '17 at 15:28

1 Answers1

1

Found the answer here: How do I type a TAB character in PowerShell?.

Basically use "`t" (back-tick t in double quotes) to specify a tab in PS.

Colin Wu
  • 611
  • 7
  • 25
  • Not quite the same as he's not trying to type a tab character, but needs to use a tab escape character. His mistake is simple, he doesn't know what the escape character is in PowerShell: `\`` – Maximilian Burszley Aug 28 '17 at 15:26