By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

Check for File Existence in VB6.

P: 19
Can someone please tell me how to check to see if a file exists in VB 6.
Nov 10 '06 #1
Share this Question
Share on Google+
4 Replies


100+
P: 267
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

P: 19
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+
P: 267
What data type should ret be?
hi

ret is a stringtype
Nov 11 '06 #4

P: 9
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.