convert csv to tsv using Powershell; Import-Csv fails
<p>I am having set of <em>CSV</em> files in a folder. I want to convert the files into <em>TSV</em> file format. I want to use <code>Powershell</code> for the same. </p>

<p>I tried using the below script. it is throwing error. </p>

<pre><code>Get-ChildItem "C:\Users\myname\Desktop\sampledata" | ForEach-Object { Import-Csv $_.FullName | Export-Csv {$_.Name} -Delimiter "`t" -Encoding UTF8 }
</code></pre>

<p>I am getting errors similar to below:</p>

<blockquote>
  <p>Import-Csv : The member "1" is already present. At line:8 char:72
  + ... Desktop\sampledata" | ForEach-Object { Import-Csv $_.FullName | Expor ...
  +                                            ~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Import-Csv], ExtendedTypeSystemException
      + FullyQualifiedErrorId : AlreadyPresentPSMemberInfoInternalCollectionAdd,Microsoft.PowerShell.Commands.ImportCs</p>
</blockquote>

<p>How can I resolve this issue ? </p>