Advanced 'FileExists' (determine if file exists) [RESOLVED]
Does anyone know a more advanced way of determining if a file (path) exists?
I am currently using
VB Code:
Dim FileExists as Boolean
FileExists = Not (Dir(txtPath.Text) = "")
This works ok for plain paths like C:\autoexec.bat or C:\Program Files\App\appfile.exe. But, the problem is if I have a complex path with switches and/or parameters like C:\Program Files\App\file.exe /o pic.jpg
Detecting "/" or "-" doesnt help as some parameters can be passed without those switches. And I cant use space (" ") as folders or files can contain them in their names.
Does anyone have an idea on this?