Script to change from CSV to TAB delimited

Posted on 2011-04-21
Last Modified: 2012-05-11
Is there such a thing that could change a flat file from CSV to TAB delimited?  I will be doing this somehow within a SSIS Package.
Question by:N R
    LVL 25

    Accepted Solution

    Try this utility...
    But make a copy of the file first and test it on a copy.


    findstr . C:\yourfilename.txt | replacecmd -o "," -n {tab} can also supply input if you aren't piping input as follows...
    replacecmd -o "," -n {tab} -i "replace,the,commas"
    LVL 25

    Assisted Solution

    by:Ron M

    To convert the file...

    findstr . C:\yourfilename.txt | replacecmd -o "," -n {tab} > yournewfile.txt
    LVL 25

    Expert Comment

    by:Ron M
    ...oh more thing.

    If your csv looks like this ..."value","value"

    You would probably want to replace the quotes as well.

    Just make sure you are "testing" on a copy of the file until you get the desired output.
    LVL 11

    Author Comment

    by:N R
    Good thanks, going to give this a try.
    LVL 25

    Expert Comment

    by:Ron M
    For anyone else who happens upon this...

    <input> | replacecmd -o "oldtext" -n "newtext" <optional: -i "input">

    Special chars for -n: {tab} {enter} {cr} {lf} {crlf}

    Requires .Net framework 4
    Web Installer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now