Results 1 to 13 of 13

Thread: Advanced 'FileExists' (determine if file exists) [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    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:
    1. Dim FileExists as Boolean
    2.  
    3. 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?
    Last edited by baja_yu; Sep 19th, 2004 at 11:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width