<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Vista Forums - VB Script</title>
		<link>http://www.vistax64.com/</link>
		<description>Visual Basic scripting</description>
		<language>en</language>
		<lastBuildDate>Fri, 20 Nov 2009 23:13:56 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>15</ttl>
		<image>
			<url>http://www.vistax64.com/images/styles/vista/misc/rss.jpg</url>
			<title>Vista Forums - VB Script</title>
			<link>http://www.vistax64.com/</link>
		</image>
		<item>
			<title>Windows SBS 2008 logon script problem</title>
			<link>http://www.vistax64.com/vb-script/260969-windows-sbs-2008-logon-script-problem.html</link>
			<pubDate>Wed, 18 Nov 2009 18:18:22 GMT</pubDate>
			<description>HI Richard, 
 
Thanks for your reply. 
Yes, if I run the script manually (\\server\sysvol\.....) it works great, 
but as a logon script, not really....</description>
			<content:encoded><![CDATA[<div>HI Richard,<br />
<br />
Thanks for your reply.<br />
Yes, if I run the script manually (\\server\sysvol\.....) it works great,<br />
but as a logon script, not really. I'm applying it in GPMC (at the domain<br />
level).<br />
I'm sure the script is running because for troubleshooting issues I put some<br />
wscript.echo in the script just to see where it's at and it seems to be just<br />
fine. Actually I have a very similar script running on a testing server (sbs<br />
2008) and it works fine. I can't find any major differences between the<br />
working and not working server using RSOP.<br />
I know that it's not because the slow link, etc. test it already.<br />
The script that I posted here doesn't work too! If I applied it, I have the<br />
same problem.<br />
I have no On Error Resume Next, so any errors should be reported.<br />
<br />
It seems that this line: objNetwork.MapNetworkDrive &quot;L:&quot;, &quot;\\server\share&quot;;<br />
won't work!<br />
Any ideas?<br />
<br />
Thanks again for your reply.<br />
<br />
<br />
&quot;Richard Mueller [MVP]&quot; &lt;rlmueller-nospam@newsgroup&gt; wrote in<br />
message news:uuEp25HaKHA.1596@newsgroup<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt;<br />
&gt; &quot;gimolu&quot; &lt;gimolu@newsgroup&gt; wrote in message<br />
&gt; news:ujD9DuHaKHA.3992@newsgroup<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><br />
&gt;&gt; HI,<br />
&gt;&gt;<br />
&gt;&gt; I am having a problem with a script that I have in user logon that maps<br />
&gt;&gt; some drives I need. Here is an example of the script:<br />
&gt;&gt;<br />
&gt;&gt; Dim objNetwork<br />
&gt;&gt; Set objNetwork = CreateObject(&quot;WScript.Network&quot;)<br />
&gt;&gt;<br />
&gt;&gt; objNetwork.MapNetworkDrive &quot;L:&quot;, &quot;\\server\share&quot;<br />
&gt;&gt; objNetwork.MapNetworkDrive &quot;Y:&quot;, &quot;\\server\share1&quot;<br />
&gt;&gt;<br />
&gt;&gt; In the client computers I run he gpresult /v command and the script says<br />
&gt;&gt; that it has been executed accordingly.<br />
&gt;&gt; This is just a small part of the script because the drive map occurs if<br />
&gt;&gt; the user belongs to a specific group (and yes if I put a wscript.echo and<br />
&gt;&gt; it works great).<br />
&gt;&gt; I've run out off troubleshooting ideas! the script just won't run!<br />
&gt;&gt;<br />
&gt;&gt; Can someone point me to the right direction?<br />
&gt;&gt;<br />
&gt;&gt; PS: with the new Drive Maps Options of windows 2008 (CSE) I can map<br />
&gt;&gt; drives, however, I need this script up and running!<br />
&gt;&gt;<br />
&gt;&gt; Thanks,<br />
&gt;&gt;<br />
&gt;&gt; LR<br />
&gt;&gt;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<br />
&gt; Do you configure logon scripts on the &quot;Profile&quot; tab of user properties in<br />
&gt; ADUC, or in a Group Policy applied to the domain or an OU? Are you saying<br />
&gt; the script runs fine if you run it manually (as a normal user) after<br />
&gt; logon, but doesn't seem to run at all as a logon script?<br />
&gt;<br />
&gt; See this link for details on configuring logon scripts:<br />
&gt;<br />
&gt; <a href="http://www.rlmueller.net/LogonScriptFAQ.htm" target="_blank">http://www.rlmueller.net/LogonScriptFAQ.htm</a><br />
&gt;<br />
&gt; If the script runs fine manually, but doesn't seem to run as a logon<br />
&gt; script, add a lines to the script that either display messages to the user<br />
&gt; (using MsgBox statements), or that write information to a local file.<br />
&gt;<br />
&gt; Possibly the script raises an error. If you use &quot;On Error Resume Next&quot;,<br />
&gt; remove that so you see the error message. Otherwise, you may need to post<br />
&gt; the script here so we can evaluate it. Some methods commonly used to<br />
&gt; evaluate group membership are flawed, for example.<br />
&gt;<br />
&gt; --<br />
&gt; Richard Mueller<br />
&gt; MVP Directory Services<br />
&gt; Hilltop Lab - <a href="http://www.rlmueller.net" target="_blank">http://www.rlmueller.net</a><br />
&gt; --<br />
&gt;<br />
&gt;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>gimolu</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260969-windows-sbs-2008-logon-script-problem.html</guid>
		</item>
		<item>
			<title>total size of files</title>
			<link>http://www.vistax64.com/vb-script/260943-total-size-files.html</link>
			<pubDate>Wed, 18 Nov 2009 15:19:59 GMT</pubDate>
			<description><![CDATA[On Nov 18, 11:58*am, Tom Lavedas <tglba...@newsgroup> wrote: 
---Quote--- 
> On Nov 18, 11:40*am, Tom1 <usernetu...@newsgroup> wrote: 
> 
> 
> 
> 
>...]]></description>
			<content:encoded><![CDATA[<div>On Nov 18, 11:58*am, Tom Lavedas &lt;tglba...@newsgroup&gt; wrote:<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On Nov 18, 11:40*am, Tom1 &lt;usernetu...@newsgroup&gt; wrote:<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><br />
&gt; &gt; On Nov 18, 10:43*am, Tom Lavedas &lt;tglba...@newsgroup&gt; wrote:</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; On Nov 18, 10:19*am, Tom1 &lt;usernetu...@newsgroup&gt; wrote:</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; &gt; I need a script to find out the number &amp; total size of files based<br />
&gt; &gt; &gt; &gt; upon the file extention across about 30 servers. I'm searching for mdb<br />
&gt; &gt; &gt; &gt; files. The script will be run remotely against local drives on these<br />
&gt; &gt; &gt; &gt; servers. Thanks</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; &lt;warning&gt;<br />
&gt; &gt; &gt; &lt;aircode&gt;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; with createobject(&quot;scripting.filesystemobject&quot;)<br />
&gt; &gt; &gt; * aComputers = split(.opentextfile(&quot;D:\Someplace\complist.txt&quot;, _<br />
&gt; &gt; &gt; * * * * * * * * 1).readall, vbnewline)<br />
&gt; &gt; &gt; end with</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; nComputers = UBound(aComputers)<br />
&gt; &gt; &gt; Redim aData(nComputers)</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; for i = 0 to nComputers<br />
&gt; &gt; &gt; * nSize = 0<br />
&gt; &gt; &gt; * nCount = 0<br />
&gt; &gt; &gt; * Set objWMIService = GetObject(&quot;winmgmts:&quot; _<br />
&gt; &gt; &gt; * * &amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp; _<br />
&gt; &gt; &gt; * * * * aComputers(i) &amp; &quot;\root\cimv2&quot;)<br />
&gt; &gt; &gt; * Set colFiles = objWMIService.ExecQuery _<br />
&gt; &gt; &gt; * * (&quot;Select * from CIM_DataFile where Extension = 'mdb'&quot;, , 48)<br />
&gt; &gt; &gt; * For Each objFile in colFiles<br />
&gt; &gt; &gt; * * nSize = nSize + objFile.size<br />
&gt; &gt; &gt; * Next<br />
&gt; &gt; &gt; * nCount = nCount + colFiles.count<br />
&gt; &gt; &gt; * aData(i) = Join(Array(aComputers(i), nCount, nSize), &quot;, &quot;)<br />
&gt; &gt; &gt; Next</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; wsh.echo Join(aData, vbnewline)</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; &lt;/aircode&gt;<br />
&gt; &gt; &gt; &lt;/warning&gt;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="darkred"><br />
&gt; &gt; &gt; Another warning: *CIM_DataFile searches are SLOW. *Be prepared toW -<br />
&gt; &gt; &gt; A - I - T.<br />
&gt; &gt; &gt; _____________________<br />
&gt; &gt; &gt; Tom Lavedas</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><br />
&gt; &gt; Thanks but I get the following error message:</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><br />
&gt; &gt; test.vbs(22, 5) Microsoft VBScript runtime error: Object doesn't<br />
&gt; &gt; support this property or method: 'size'</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<br />
&gt; I was afraid of that - I keep forgetting what the differences are<br />
&gt; between Shell.Application and FSO. *OK, try this mod ...<br />
&gt;<br />
&gt; set fso = *createobject(&quot;scripting.filesystemobject&quot;)<br />
&gt; with fso<br />
&gt; * aComputers = split(.opentextfile(&quot;D:\Someplace\complist.txt&quot;, _<br />
&gt; * * * * * * * * 1).readall, vbnewline)<br />
&gt; end with<br />
&gt;<br />
&gt; nComputers = UBound(aComputers)<br />
&gt; Redim aData(nComputers)<br />
&gt;<br />
&gt; for i = 0 to nComputers<br />
&gt; * nSize = 0<br />
&gt; * nCount = 0<br />
&gt; * Set objWMIService = GetObject(&quot;winmgmts:&quot; _<br />
&gt; * * &amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp; _<br />
&gt; * * * * aComputers(i) &amp; &quot;\root\cimv2&quot;)<br />
&gt; * Set colFiles = objWMIService.ExecQuery _<br />
&gt; * * (&quot;Select * from CIM_DataFile where Extension = 'mdb'&quot;, , 48)<br />
&gt; * For Each objFile in colFiles<br />
&gt; * * nSize = nSize + fso.GetFile(objFile.Path).size<br />
&gt; * Next<br />
&gt; * nCount = nCount + colFiles.count<br />
&gt; * aData(i) = Join(Array(aComputers(i), nCount, nSize), &quot;, &quot;)<br />
&gt; Next<br />
&gt;<br />
&gt; wsh.echo Join(aData, vbnewline)<br />
&gt; _____________________<br />
&gt; Tom Lavedas- Hide quoted text -<br />
&gt;<br />
&gt; - Show quoted text -</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>Still not working -- test.vbs(24, 5) Microsoft VBScript runtime error:<br />
File not found<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Tom1</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260943-total-size-files.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260928-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Wed, 18 Nov 2009 04:08:00 GMT</pubDate>
			<description><![CDATA["Learn4Develop" <Learn4Develop@newsgroup> wrote in message 
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup 
---Quote--- 
> On daily bases I have...]]></description>
			<content:encoded><![CDATA[<div><br />
&quot;Learn4Develop&quot; &lt;Learn4Develop@newsgroup&gt; wrote in message<br />
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On daily bases I have received files with double quotes comma separated,<br />
&gt; but<br />
&gt; in some records I found 2 times double quotes and some time different<br />
&gt; squence<br />
&gt; of double quotes placements.<br />
&gt;<br />
&gt; I just want to remove all unnecessary (extra) double quotes (see the<br />
&gt; following values where i want to remove extra double quotes.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;&quot;Company D-Val&quot;&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;&quot;Recycle&quot; Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;&quot;AB Ltd&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; I am looking the output like that.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;Company D-Val&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;Recycle Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;AB Ltd&quot;,&quot;Need Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; Following code i used is work fine with &quot;&quot;Company D-Val&quot;&quot; but didn't work<br />
&gt; with &quot;&quot;Recycle&quot; Rubbish, C class&quot;, The code is<br />
&gt;<br />
&gt; code:-<br />
&gt; Do While inFile.AtEndOfStream = False<br />
&gt; record = InFile.ReadLine()<br />
&gt; record = Replace(record, &quot;&quot;&quot;&quot;, &quot;&quot;&quot;&quot;) 'replace &quot;&quot; with single space<br />
&gt; outFile.WriteLine record &amp; vbclrf<br />
&gt; Loop</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>I agree with Christoph that either the mechanism that creates this<br />
non-standard quoting of a CSV file should be made more robust, or a more<br />
robust mechanism should be used to read the poorly implimented CSV file.<br />
Perhaps a simple VBScript using ADO as the robust file reading mechanism<br />
could be used.<br />
<br />
-Paul Randall<br />
<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Paul Randall</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260928-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260927-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Tue, 17 Nov 2009 23:31:32 GMT</pubDate>
			<description><![CDATA[Learn4Develop schrieb: 
 
---Quote--- 
> On daily bases I have received files with double quotes comma separated, but 
> in some records I found 2...]]></description>
			<content:encoded><![CDATA[<div>Learn4Develop schrieb:<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On daily bases I have received files with double quotes comma separated, but<br />
&gt; in some records I found 2 times double quotes and some time different squence<br />
&gt; of double quotes placements.<br />
&gt;<br />
&gt; I just want to remove all unnecessary (extra) double quotes (see the<br />
&gt; following values where i want to remove extra double quotes.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;&quot;Company D-Val&quot;&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;&quot;Recycle&quot; Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;&quot;AB Ltd&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; I am looking the output like that.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;Company D-Val&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;Recycle Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;AB Ltd&quot;,&quot;Need Clean Drive Way, stores&quot;,&quot;GF0347&quot;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>If you want to implement the appropriate algorithm, you cannot<br />
use a replace-mechanism based on literals, you always have to be<br />
aware of the quoting and delimiting context.<br />
The right way, j2mc, is to parse the string char by char, count the<br />
DQs and check whether a DQ is followed by a delimiter.<br />
If the delimiter appears after an even number of DQs it truly terminates<br />
the token, if the number is odd it's an &quot;inline-delimiter&quot;.<br />
A DQ on the other hand is kept if its the first one (obvious,<br />
as opener) or one with an even ordinal number followed by the delimiter<br />
(terminator).<br />
<br />
Christoph<br />
<br />
<br />
In VBS a function that follows these rules would like this:<br />
<br />
<br />
'---------------------<br />
Function unquote(record)<br />
<br />
Const DQ = &quot;&quot;&quot;&quot;<br />
Const CM = &quot;,&quot;<br />
<br />
Dim newRecord<br />
Dim dqCount<br />
Dim char<br />
Dim nextChar<br />
Dim i<br />
Dim keep<br />
<br />
newRecord = &quot;&quot;<br />
dqCount = 0<br />
<br />
For i = 1 To Len(Record)<br />
<br />
char = Mid(record, i, 1)<br />
nextChar = Mid(record, i+1, 1)<br />
keep = 0<br />
<br />
If char = DQ Then<br />
If dqCount = 0 Then<br />
'beginning of token<br />
keep = 1<br />
dqCount = 1<br />
<br />
ElseIf (dqCount Mod 2 = 1) And _<br />
(nextChar = CM  OR nextChar = &quot;&quot;) Then<br />
<br />
'end of token marked by &quot;, OR &quot;\r\n<br />
keep = 1<br />
dqCount = 0<br />
Else<br />
'inline &quot;<br />
keep = 0<br />
dqCount = dqCount + 1<br />
End If<br />
Else<br />
'char other then &quot;<br />
keep = 1<br />
End If<br />
If keep = 1 Then<br />
newRecord = newRecord &amp; char<br />
End If<br />
'WSH.Echo dqCount, i, keep, char, nextchar, newRecord<br />
Next<br />
unquote = newRecord<br />
End Function<br />
'---------------------<br />
<br />
To test the results, run:<br />
<br />
'---------------------<br />
Option Explicit<br />
Dim records<br />
records =  Array ( _<br />
&quot;&quot;&quot;0123x&quot;&quot;,&quot;&quot;&quot;&quot;Company D-Val&quot;&quot;&quot;&quot;,&quot;&quot;Class D, sector N&quot;&quot;,&quot;&quot;DD5894&quot;&quot;&quot; _<br />
, &quot;&quot;&quot;4894D&quot;&quot;,&quot;&quot;&quot;&quot;Recycle&quot;&quot; Rubbish, C class&quot;&quot;,&quot;&quot;Class D, Sector F, Block<br />
N&quot;&quot;,&quot;&quot;D870GH&quot;&quot;&quot; _<br />
, &quot;&quot;&quot;AB8679&quot;&quot;,&quot;&quot;&quot;&quot;AB Ltd&quot;&quot;&quot;&quot;,&quot;&quot;&quot;&quot;Need&quot;&quot; Clean Drive Way,<br />
stores&quot;&quot;,&quot;&quot;GF0347&quot;&quot;&quot; _<br />
, &quot;&quot;&quot;&quot;&quot;AB8679&quot;&quot;, Test New&quot;&quot;,&quot;&quot;&quot;&quot;&quot;&quot;AB Ltd&quot;&quot;&quot;&quot;&quot;&quot;,&quot;&quot;&quot;&quot;Need&quot;&quot; Clean Drive<br />
Way, stores&quot;&quot;,&quot;&quot;GF0347&quot;&quot;&quot; _<br />
)<br />
<br />
Dim Record<br />
<br />
For Each Record in records<br />
WSH.Echo record<br />
WSH.Echo unquote(record)<br />
WSH.Echo<br />
Next<br />
<br />
<br />
Function unquote(record)<br />
....<br />
End Function<br />
'---------------------<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Christoph Basedau</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260927-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Win 2008 prompting to run .vbs</title>
			<link>http://www.vistax64.com/vb-script/260926-win-2008-prompting-run-vbs.html</link>
			<pubDate>Tue, 17 Nov 2009 19:03:20 GMT</pubDate>
			<description><![CDATA[How do I keep my win 2008 server from asking me if I want to run a .vbs, 
when it was called from a .cmd file?  I'm logged on as a normal user 
when...]]></description>
			<content:encoded><![CDATA[<div>How do I keep my win 2008 server from asking me if I want to run a .vbs,<br />
when it was called from a .cmd file?  I'm logged on as a normal user<br />
when running it, but can log on as administrator to change settings if<br />
necessary.<br />
<br />
<br />
--<br />
/~\ The ASCII<br />
\ / Ribbon Campaign<br />
X  Against HTML<br />
/ \ Email!<br />
<br />
Remove the ns_ from if replying by e-mail (but keep posts in the<br />
newsgroups if possible).<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>David Kerber</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260926-win-2008-prompting-run-vbs.html</guid>
		</item>
		<item>
			<title>Re: Overwritting</title>
			<link>http://www.vistax64.com/vb-script/260925-re-overwritting.html</link>
			<pubDate>Tue, 17 Nov 2009 05:53:14 GMT</pubDate>
			<description>Hi Csaba, 
 
Great thanks for that. 
The script may need to display two or more hyperlinks down the page, how do 
I display the second and third...</description>
			<content:encoded><![CDATA[<div>Hi Csaba,<br />
<br />
Great thanks for that.<br />
The script may need to display two or more hyperlinks down the page, how do<br />
I display the second and third ones? I tried the following line but it came<br />
up with an error?<br />
<br />
Set newLink = document.createElement(&quot;B&quot;)<br />
<br />
Regards, Steve<br />
<br />
&quot;Csaba Gabor&quot; wrote:<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On Nov 15, 10:44 pm, Steve &lt;St...@newsgroup&gt; wrote:<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="green"><br />
&gt; &gt; I have a little VBScript program embedded into a web page that displays<br />
&gt; &gt; hyperlinks but it overwites what was on the web page previous to running the<br />
&gt; &gt; script, how do I stop it overwrite what was previously on the page? script<br />
&gt; &gt; below<br />
&gt; &gt;<br />
&gt; &gt; document.WriteLN(&quot;&lt;a href=http://www.google.com&gt;Google&lt;/a href&gt;&lt;br /&gt;&quot;)</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>&gt;<br />
&gt; This script below shows two ways to append your links.<br />
&gt;<br />
&gt; Set newLink = document.createElement(&quot;A&quot;)<br />
&gt; newLink.href = &quot;http://google.com&quot;<br />
&gt; newLink.innerText = &quot;My link to Google&quot;<br />
&gt; document.body.appendChild newLink<br />
&gt;<br />
&gt; document.body.innerHTML = document.body.innerHTML &amp; _<br />
&gt;   &quot;&lt;br&gt;&lt;a href='http://ebay.com'&gt;My link to eBay&lt;/a&gt;&quot;<br />
&gt;<br />
&gt; The first way (first 4 lines) is the &quot;more proper&quot; way.<br />
&gt; The reason is because the second way can overwrite<br />
&gt; other things you may have done with your web page.<br />
&gt; For example, you will get an error if you append the<br />
&gt; following line to the code above:<br />
&gt;<br />
&gt; MsgBox newLink.parentNode.outerHTML<br />
&gt;<br />
&gt; since the act of rewriting the body, wipes out variables<br />
&gt; and event handlers and some other modifications that<br />
&gt; may have been set because the entire DOM is redone.<br />
&gt;<br />
&gt; Csaba Gabor from Vienna<br />
&gt; .<br />
&gt;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div></div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Steve</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260925-re-overwritting.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260924-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Tue, 17 Nov 2009 04:16:34 GMT</pubDate>
			<description><![CDATA[Learn4Develop wrote: 
---Quote--- 
> On daily bases I have received files with double quotes comma separated, 
---End Quote--- 
but 
---Quote--- 
>...]]></description>
			<content:encoded><![CDATA[<div>Learn4Develop wrote:<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On daily bases I have received files with double quotes comma separated,</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>but<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; in some records I found 2 times double quotes and some time different</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>squence<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; of double quotes placements.<br />
&gt;<br />
&gt; I just want to remove all unnecessary (extra) double quotes (see the<br />
&gt; following values where i want to remove extra double quotes.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;&quot;Company D-Val&quot;&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;&quot;Recycle&quot; Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;&quot;AB Ltd&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; I am looking the output like that.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;Company D-Val&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;Recycle Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;AB Ltd&quot;,&quot;Need Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; Following code i used is work fine with &quot;&quot;Company D-Val&quot;&quot; but didn't work<br />
&gt; with &quot;&quot;Recycle&quot; Rubbish, C class&quot;, The code is<br />
&gt;<br />
&gt; code:-<br />
&gt; Do While inFile.AtEndOfStream = False<br />
&gt; record = InFile.ReadLine()<br />
&gt; record = Replace(record, &quot;&quot;&quot;&quot;, &quot;&quot;&quot;&quot;) 'replace &quot;&quot; with single space<br />
&gt; outFile.WriteLine record &amp; vbclrf<br />
&gt; Loop</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>record = Replace(record, Chr(34)&amp;Chr(34), Chr(34)) 'replace &quot;&quot; with single &quot;<br />
<br />
--<br />
Todd Vargo<br />
(Post questions to group only. Remove &quot;z&quot; to email personal messages)<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Todd Vargo</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260924-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260923-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Tue, 17 Nov 2009 03:48:10 GMT</pubDate>
			<description><![CDATA["Learn4Develop" <Learn4Develop@newsgroup> wrote in message 
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup 
---Quote--- 
> On daily bases I have...]]></description>
			<content:encoded><![CDATA[<div><br />
&quot;Learn4Develop&quot; &lt;Learn4Develop@newsgroup&gt; wrote in message<br />
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On daily bases I have received files with double quotes comma separated,<br />
&gt; but<br />
&gt; in some records I found 2 times double quotes and some time different<br />
&gt; squence<br />
&gt; of double quotes placements.<br />
&gt;<br />
&gt; I just want to remove all unnecessary (extra) double quotes (see the<br />
&gt; following values where i want to remove extra double quotes.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;&quot;Company D-Val&quot;&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;&quot;Recycle&quot; Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;&quot;AB Ltd&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;GF0347&quot;</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>The rubbish line looks like exactly that. the first paired double quotes are<br />
not matched by another such pair. In the context of your data, what does it<br />
mean to have a doubled double-quote?<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt;<br />
&gt; I am looking the output like that.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;Company D-Val&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;Recycle Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;AB Ltd&quot;,&quot;Need Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; Following code i used is work fine with &quot;&quot;Company D-Val&quot;&quot; but didn't work<br />
&gt; with &quot;&quot;Recycle&quot; Rubbish, C class&quot;, The code is<br />
&gt;<br />
&gt; code:-<br />
&gt; Do While inFile.AtEndOfStream = False<br />
&gt; record = InFile.ReadLine()<br />
&gt; record = Replace(record, &quot;&quot;&quot;&quot;, &quot;&quot;&quot;&quot;) 'replace &quot;&quot; with single space</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>That replace call seems to change each double quote with exactly one double<br />
quote.<br />
<br />
Perhaps you just need to change each pair of double quotes with a single<br />
double quote.<br />
<br />
/Al<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; outFile.WriteLine record &amp; vbclrf<br />
&gt; Loop</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div><br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Al Dunbar</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260923-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260922-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Mon, 16 Nov 2009 21:15:54 GMT</pubDate>
			<description><![CDATA[Strange - my initial reply appears to have disappeared into the never-never. 
I'll try to post it once more: 
 
You could do it like this for every...]]></description>
			<content:encoded><![CDATA[<div>Strange - my initial reply appears to have disappeared into the never-never.<br />
I'll try to post it once more:<br />
<br />
You could do it like this for every line of text:<br />
1. Replace every &quot;,&quot; with your own delimiter. I use chr(0).<br />
2. Remove all remaining double quotes.<br />
3. Replace your own delimiters with &quot;,&quot;.<br />
4. Surround the line with double quotes.<br />
This code appears to work for your data sample:<br />
<br />
Q = &quot;&quot;&quot;&quot;<br />
Z = Chr(0)<br />
sDelimiter = Q &amp; &quot;,&quot; &amp; Q<br />
Set  oFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br />
Set oFile = oFSO.OpenTextFile(&quot;d:\test.txt&quot;)<br />
While Not oFile.AtEndOfStream<br />
sLine = Replace(oFile.ReadLine, sDelimiter, Z)<br />
sLine = Replace(sLine, Q, &quot;&quot;)<br />
sLine = Q &amp; Replace(sLine, Z, sDelimiter) &amp; Q<br />
WScript.Echo sLine<br />
Wend<br />
<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator><![CDATA[Pegasus [MVP]]]></dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260922-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260921-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Mon, 16 Nov 2009 20:54:18 GMT</pubDate>
			<description><![CDATA["Learn4Develop" <Learn4Develop@newsgroup> wrote in message 
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup 
---Quote--- 
> On daily bases I have...]]></description>
			<content:encoded><![CDATA[<div><br />
&quot;Learn4Develop&quot; &lt;Learn4Develop@newsgroup&gt; wrote in message<br />
news:C072F055-9B82-4D2D-A4D2-216403F47814@newsgroup<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; On daily bases I have received files with double quotes comma separated,<br />
&gt; but<br />
&gt; in some records I found 2 times double quotes and some time different<br />
&gt; squence<br />
&gt; of double quotes placements.<br />
&gt;<br />
&gt; I just want to remove all unnecessary (extra) double quotes (see the<br />
&gt; following values where i want to remove extra double quotes.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;&quot;Company D-Val&quot;&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;&quot;Recycle&quot; Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;&quot;AB Ltd&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; I am looking the output like that.<br />
&gt;<br />
&gt; &quot;0123x&quot;,&quot;Company D-Val&quot;,&quot;Class D, sector N&quot;,&quot;DD5894&quot;<br />
&gt; &quot;4894D&quot;,&quot;Recycle Rubbish, C class&quot;,&quot;Class D, Sector F, Block N&quot;,&quot;D870GH&quot;<br />
&gt; &quot;AB8679&quot;,&quot;AB Ltd&quot;,&quot;Need Clean Drive Way, stores&quot;,&quot;GF0347&quot;<br />
&gt;<br />
&gt;<br />
&gt; Following code i used is work fine with &quot;&quot;Company D-Val&quot;&quot; but didn't work<br />
&gt; with &quot;&quot;Recycle&quot; Rubbish, C class&quot;, The code is<br />
&gt;<br />
&gt; code:-<br />
&gt; Do While inFile.AtEndOfStream = False<br />
&gt; record = InFile.ReadLine()<br />
&gt; record = Replace(record, &quot;&quot;&quot;&quot;, &quot;&quot;&quot;&quot;) 'replace &quot;&quot; with single space<br />
&gt; outFile.WriteLine record &amp; vbclrf<br />
&gt; Loop</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>You could do it like this for every line of text:<br />
1. Replace every &quot;,&quot; with your own delimiter. I use chr(0).<br />
2. Remove all remaining double quotes.<br />
3. Replace your own delimiters with &quot;,&quot;.<br />
4. Surround the line with double quotes.<br />
This code appears to work for your data sample:<br />
<br />
Q = &quot;&quot;&quot;&quot;<br />
Z = Chr(0)<br />
sDelimiter = Q &amp; &quot;,&quot; &amp; Q<br />
Set  oFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br />
Set oFile = oFSO.OpenTextFile(&quot;d:\test.txt&quot;)<br />
While Not oFile.AtEndOfStream<br />
sLine = Replace(oFile.ReadLine, sDelimiter, Z)<br />
sLine = Replace(sLine, Q, &quot;&quot;)<br />
sLine = Q &amp; Replace(sLine, Z, sDelimiter) &amp; Q<br />
WScript.Echo sLine<br />
Wend<br />
<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator><![CDATA[Pegasus [MVP]]]></dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260921-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Remove extra Double codes from CSV Files (vb Script Language)</title>
			<link>http://www.vistax64.com/vb-script/260920-re-remove-extra-double-codes-csv-files-vb-script-language.html</link>
			<pubDate>Mon, 16 Nov 2009 15:28:03 GMT</pubDate>
			<description><![CDATA[Learn4Develop wrote: 
---Quote--- 
> Hi Tom 
>   Thanks for the code, its working fine with the above criteria, but gives 
> me error if there is...]]></description>
			<content:encoded><![CDATA[<div>Learn4Develop wrote:<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; Hi Tom<br />
&gt;   Thanks for the code, its working fine with the above criteria, but gives<br />
&gt; me error if there is Null value between double quotes (&quot;&quot;) i.e.<br />
&gt;<br />
&gt; (&quot;AB8679&quot;,&quot;&quot;&quot;&quot;,&quot;&quot;Need&quot; Clean Drive Way, stores&quot;,&quot;&quot;)<br />
&gt;<br />
&gt; As i have some columns in CSV file where the value is Null &quot;&quot;. How i can<br />
&gt; resolve it.<br />
&gt;<br />
&gt; Thanks again for your great help.</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>ISTM, only strings containing a comma  should need quoted. But since you say<br />
it gives you an error, it begs the questions. What is giving the error? And<br />
what is creating these incorrect csv files?<br />
<br />
--<br />
Todd Vargo<br />
(Post questions to group only. Remove &quot;z&quot; to email personal messages)<br />
<br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>Tom Lavedas</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260920-re-remove-extra-double-codes-csv-files-vb-script-language.html</guid>
		</item>
		<item>
			<title>Re: Overwritting</title>
			<link>http://www.vistax64.com/vb-script/260919-re-overwritting.html</link>
			<pubDate>Mon, 16 Nov 2009 15:04:24 GMT</pubDate>
			<description>In addition to the other ideas, you might want to 
look into insertAdjacentHTML. That method 
allows you to add new HTML in relation to any 
object....</description>
			<content:encoded><![CDATA[<div>In addition to the other ideas, you might want to<br />
look into insertAdjacentHTML. That method<br />
allows you to add new HTML in relation to any<br />
object. If you assign IDs to objects then it's<br />
easy to call.<br />
Also, createTextRange and the TextRange object<br />
provide ways to add or edit text.<br />
<br />
I don't know whether these methods are the same<br />
in the DOM used by Firefox/Opera, but if you're only<br />
using VBS with IE you don't need to worry about that.<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; I have a little VBScript program embedded into a web page that displays<br />
&gt; hyperlinks but it overwites what was on the web page previous to running</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div>the<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				<font color="blue"><br />
&gt; script, how do I stop it overwrite what was previously on the page? script<br />
&gt; below<br />
&gt;<br />
&gt; document.WriteLN(&quot;&lt;a href=http://www.google.com &gt;Google&lt;/a href&gt;&lt;br /&gt;&quot;)<br />
&gt;<br />
&gt; Thanks, Steve</font>
			
			<hr />
		</td>
	</tr>
	</table>
</div><br />
</div>

]]></content:encoded>
			<category domain="http://www.vistax64.com/vb-script/">VB Script</category>
			<dc:creator>mayayana</dc:creator>
			<guid isPermaLink="true">http://www.vistax64.com/vb-script/260919-re-overwritting.html</guid>
		</item>
	</channel>
</rss>
