467,151 Members | 900 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

Check for File Existence in VB6.

Can someone please tell me how to check to see if a file exists in VB 6.
Nov 10 '06 #1
  • viewed: 4961
Share:
4 Replies
100+
Can someone please tell me how to check to see if a file exists in VB 6.
hi

try using

ret=dir (path & filename , 0)
ret will be empty is the file doesn't exist
Nov 10 '06 #2
hi

try using

ret=dir (path & filename , 0)
ret will be empty is the file doesn't exist

What data type should ret be?
Nov 10 '06 #3
100+
What data type should ret be?
hi

ret is a stringtype
Nov 11 '06 #4
1.Ist Invoke Microsoft Scripting Runtime Reference in Our Project(in Code)
2.In Declaration Part
ex : dim fs as new FileSystem
3.
' ex: FilePath and name app.path & "Filename"

if fs.fileexists(app.path & "1.jas") then
msgbox("File Found")
else
msgbox("File Not Found")
endif
Thanking U
- R.Jayaprakash
Nov 12 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Christopher Nelson | last post: by
6 posts views Thread by hectorlas@yahoo.com | last post: by
2 posts views Thread by www.MessageMazes.com | last post: by
52 posts views Thread by paytam@gmail.com | last post: by
5 posts views Thread by Gary Wessle | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.