File exists in Dos Path? 
Author Message
 File exists in Dos Path?

hello
   Is there an easy way to determine if a file exists in the dos PATH
environment variable.  I can do it by brute force: parsing  the Path
variable for each directory and checking for file existance but I'm
hoping there is an easier way.

  I  could try to launch the program and if it fails it's not in the
path but I don't want to launch it and I want the directory
the file is in, if any.

Best wishes
   Murray



Fri, 29 Dec 2000 03:00:00 GMT  
 File exists in Dos Path?
How about trying to call the file from a directory which it isn't in, and
trapping the error if it isn't in the PATH? Just a thought...
Quote:

> hello
>    Is there an easy way to determine if a file exists in the dos PATH
> environment variable.  I can do it by brute force: parsing  the Path
> variable for each directory and checking for file existance but I'm
> hoping there is an easier way.

>   I  could try to launch the program and if it fails it's not in the
> path but I don't want to launch it and I want the directory
> the file is in, if any.

> Best wishes
>    Murray



Fri, 29 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Finding if File and Path Exists?

2. Reading Target path from *existing* shortcut files.

3. ? How do you change a path to a dos path name

4. Check for existing DOS-file

5. Getting DOS 8.3 path from Windows long file name

6. Getting a File's Dos Name and Path

7. need API call to get DOS filename for file and path

8. files exists or not - says that it doesn't exist

9. File existing or not existing?

10. Paths -- Creating File Path with several levels -- VBScript

11. Dir Path Or File Path

12. fRefreshLinks Doesn't work if path doesn't exist

 

 
Powered by phpBB® Forum Software