Newbie Question about FileExists Method 
Author Message
 Newbie Question about FileExists Method

Yep.

Imagine if one file exists but another file doesn't - what should the method
return? - 'true', 'false' or perhaps 'maybe'?

No sarcasm intended. However, a little thought will show why the method
can't act on more than one object at a time. Imagine how you would write the
method and I'm sure you'll come across some pretty knotty problems with what
you should be doing and returning to the user.

Chris Barber.


Is there a (good) reason why the DeleteFile Method will accept wildcards
and the FileExists Method won't?  How do you get around this limitation?

Thanks,
Jim



Fri, 08 Oct 2004 19:33:46 GMT  
 Newbie Question about FileExists Method
Oops - I feel about 1" high.

Hmm. I still feel that the 'if exists' bit for .bat and .cmd files is not
really adherring to the true intent of an 'exists' function.

Anyone else know if it can be done- I presume this is with FSO.FileExists().

I think that your probably out of luck with FSO though. Looking at the
documentation I'm pretty sure that it doesn't do what you want.

Chris Barber.




Quote:
> Yep.

> Imagine if one file exists but another file doesn't - what should the
method
> return? - 'true', 'false' or perhaps 'maybe'?

It should return true if any one file matches.

Quote:
> No sarcasm intended. However, a little thought will show why the method
> can't act on more than one object at a time. Imagine how you would write
the
> method and I'm sure you'll come across some pretty knotty problems with
what
> you should be doing and returning to the user.

'if exist' works find using wildcards in .bat and .cmd files.


Fri, 08 Oct 2004 22:55:59 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling a method in a vb dll from html page - newbie question

2. Input Method with JScript? (Newbie Question)

3. FileExists Method

4. Fileexists method

5. FileExists method

6. ActiveXObject - FileExists Method Problem

7. FileExists fails Question

8. FileExists question?

9. FileExists Question

10. Newbie question: Session_OnEnd question

11. Newbie : help on OnSubmit method

12. Using a variable within WshShell object and Run method (newbie at work)

 

 
Powered by phpBB® Forum Software