 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: I would like to know the code to do a &#8220;if file exist then&#8221; in visual basic.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 18:27:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: thefinder</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78791</link>
		<dc:creator>thefinder</dc:creator>
		<pubDate>Thu, 01 Jul 2010 18:29:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-78791</guid>
		<description><![CDATA[Thank you both Vatchy and Carlosdl,
It was my bad, yesterday on debugging I had told it to msgbox me and today I forgot that line was there, it&#039;s now working as expected. you rock.]]></description>
		<content:encoded><![CDATA[<p>Thank you both Vatchy and Carlosdl,<br />
It was my bad, yesterday on debugging I had told it to msgbox me and today I forgot that line was there, it&#8217;s now working as expected. you rock.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thefinder</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78790</link>
		<dc:creator>thefinder</dc:creator>
		<pubDate>Thu, 01 Jul 2010 18:22:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-78790</guid>
		<description><![CDATA[Thank you, it&#039;s now working, but is there a way to have it check and not show the file and path to file in a msgbox before it replies to true or false.]]></description>
		<content:encoded><![CDATA[<p>Thank you, it&#8217;s now working, but is there a way to have it check and not show the file and path to file in a msgbox before it replies to true or false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatchy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78778</link>
		<dc:creator>vatchy</dc:creator>
		<pubDate>Thu, 01 Jul 2010 15:08:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-78778</guid>
		<description><![CDATA[Sorry, major brain fart.  Carlosdl is correct about how to call it.  Replace the last two lines I gave you (Dim and If) and replace with his example.]]></description>
		<content:encoded><![CDATA[<p>Sorry, major brain fart.  Carlosdl is correct about how to call it.  Replace the last two lines I gave you (Dim and If) and replace with his example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78775</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Thu, 01 Jul 2010 14:41:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-78775</guid>
		<description><![CDATA[Hi TheFinder.

Actually, you should call the function provided by Vatchy this way:

&lt;pre&gt;If Check_File(&lt;your_filename&gt;) = True Then&lt;/pre&gt;

(Replacing &lt;your_fllename&gt; with the name of the file you want to check).]]></description>
		<content:encoded><![CDATA[<p>Hi TheFinder.</p>
<p>Actually, you should call the function provided by Vatchy this way:</p>
<pre>If Check_File(&lt;your_filename&gt;) = True Then</pre>
<p>(Replacing &lt;your_fllename&gt; with the name of the file you want to check).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thefinder</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78758</link>
		<dc:creator>thefinder</dc:creator>
		<pubDate>Thu, 01 Jul 2010 01:47:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-78758</guid>
		<description><![CDATA[Ok. I&#039;ve done as you stated but to no avail. Please clarify if you will. Thank you.]]></description>
		<content:encoded><![CDATA[<p>Ok. I&#8217;ve done as you stated but to no avail. Please clarify if you will. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thefinder</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78757</link>
		<dc:creator>thefinder</dc:creator>
		<pubDate>Thu, 01 Jul 2010 00:21:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-78757</guid>
		<description><![CDATA[Where do I put the Private function at, declaratons? or on it&#039;s on page?]]></description>
		<content:encoded><![CDATA[<p>Where do I put the Private function at, declaratons? or on it&#8217;s on page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatchy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78756</link>
		<dc:creator>vatchy</dc:creator>
		<pubDate>Wed, 30 Jun 2010 23:44:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-78756</guid>
		<description><![CDATA[Try this function:

&lt;pre&gt;
Private Function Check_File(sPath As String) As Boolean
    If Dir$(sPath) &lt;&gt; &quot;&quot; Then
        Check_File = True
    Else
        Check_File = False
    End If
End Function
&lt;/pre&gt;

Call it this way:
&lt;pre&gt;
Dim bFileExists as Boolean
If bFileExists(your_filename) = True Then...
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Try this function:</p>
<pre>
Private Function Check_File(sPath As String) As Boolean
    If Dir$(sPath) &lt;&gt; "" Then
        Check_File = True
    Else
        Check_File = False
    End If
End Function
</pre>
<p>Call it this way:</p>
<pre>
Dim bFileExists as Boolean
If bFileExists(your_filename) = True Then...
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: thefinder</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-exist-in-visual-basic-2/#comment-78739</link>
		<dc:creator>thefinder</dc:creator>
		<pubDate>Wed, 30 Jun 2010 18:47:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-78739</guid>
		<description><![CDATA[I still don&#039;t understand. where do I put the file name, etc.]]></description>
		<content:encoded><![CDATA[<p>I still don&#8217;t understand. where do I put the file name, etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.042 seconds using memcached
Object Caching 365/371 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 20:56:28 -->