[Webinar] Streamline your web hosting managementRegister Today


Script to change from CSV to TAB delimited

Posted on 2011-04-21
Medium Priority
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:Nathan Riley
  • 4
LVL 25

Accepted Solution

Ron Malmstead earned 2000 total points
ID: 35443791
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}

...you 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 Malmstead
Ron Malmstead earned 2000 total points
ID: 35443793

To convert the file...

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

Expert Comment

by:Ron Malmstead
ID: 35443856
...oh yea...one 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 12

Author Comment

by:Nathan Riley
ID: 35443864
Good thanks, going to give this a try.
LVL 25

Expert Comment

by:Ron Malmstead
ID: 35444098
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses

591 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