VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Enough already!! You don't need silly code or error trapping to find out if a file exists or not.

by Craig Hillsdon (7 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 10th July 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Enough already!! You don't need silly code or error trapping to find out if a file exists or not.

Rate Enough already!! You don't need silly code or error trapping to find out if a file exists or not.




FileExists = Not (Dir(filespec)="")

'// there! filespec is the filename with full path.  If the file exists then
'// FileExits = True, if it does not exist, then FileExists = False.
'// Simple really.

Download this snippet    Add to My Saved Code

Enough already!! You don't need silly code or error trapping to find out if a file exists or not. Comments

No comments have been posted about Enough already!! You don't need silly code or error trapping to find out if a file exists or not.. Why not be the first to post a comment about Enough already!! You don't need silly code or error trapping to find out if a file exists or not..

Post your comment

Subject:
Message:
0/1000 characters