title: converting ; delimited CSV to tab delimited CSV
body: <p>I want to convert <code>;</code>-delimited CSV to tab-delimited CSV. I have tried some options. I can convert it into tab delimited text file but I need tab delimited CSV file as the output. I need a VBScript code.</p>
  
  <p>I have tried the following code which works but convert to tab delimited text file but I want tab delimited CSV file</p>
  
  <pre><code>Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
  Dim objFile : Set objFile = objFSO.OpenTextFile("\\vss22\Export\List\Export_File.csv")
  Dim objOut : Set objOut = objFSO.CreateTextFile("\\vss22\Export\List\Export_File.txt")
  
  arrData = objFile.ReadAll
  objOut.Write Replace(Replace(arrData, ";",vbTab), chr(34), "")
  objFile.Close
  objOut.Close
  </code></pre>
  
  <hr>
  
  <p><strong>Edit:</strong> Here is my Input file sample. I used the code as provided by @ansgar, but semicolon (<code>;</code>) is not replaced by tab.</p>
  
  <pre>PIM ID;Parent Product;Maintenance;MCH
   1;10001;10001;ABC
   2;20001;20001;ABC
   3;30001;30001;ABC</pre>
  
  <p>Output file is</p>
  
  <pre>PIM ID;Parent Product;Maintenance;MCH
   11000110001ABC
   22000120001ABC
   33000130001ABC</pre>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>file = "\\vwq2702\HeilerExport\TaskList\Archive\List Values.csv"
  
  Set fso = CreateObject("Scripting.FileSystemObject")
  
  txt = fso.OpenTextFile(file).ReadAll
  fso.OpenTextFile(file, 2).Write Replace(Replace(txt, ";", vbTab), Chr(34), "")
  </code></pre>