Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

checking existance of files

Posted on 1998-08-18
3
Medium Priority
?
123 Views
Last Modified: 2010-04-30
How would I go about seeing if a file exists?
0
Comment
Question by:hess
[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
3 Comments
 

Accepted Solution

by:
dr00py earned 80 total points
ID: 1429687
You can check if a file exists with a simple Dir command.
If the result is empty .. The file doesn't exist.

0
 

Expert Comment

by:dr00py
ID: 1429688
You can check if a file exists with a simple Dir command.
If the result is empty .. The file doesn't exist.
Another way is to check it's attributes using the getattr function.

0
 

Author Comment

by:hess
ID: 1429689
Thank You I was unaware of the dir function. Before i had been trying to use the on error statement and perposely cause errors but that wasn't behaveing nicely.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

688 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