?
Solved

checking file existence

Posted on 2004-09-24
2
Medium Priority
?
188 Views
Last Modified: 2010-05-02
XD i asked the same que. in ASP but i need them both so sombody can tell me how i check some file existence?
0
Comment
Question by:blabliblo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
mladenovicz earned 500 total points
ID: 12141494
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.fileexists("C:\temp\zeljko.jpg") Then
    'FILE EXISTS
End If
0
 
LVL 8

Expert Comment

by:mladenovicz
ID: 12141501
Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.fileExists(YourFileName) Then
    ' file exists
Else
    ' file does not exist
End If

Set fso = Nothing
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 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