In batch files I often used something like:
If Exist C:\test.flg then ...
or
If Not Exist C:\test.flg then ...

What's the vbscript equivalent?

--
Posted 'as is'. If there are any spelling and/or grammar mistakes, they
were a direct result of my fingers and brain not being synchronized or my
lack of caffeine.

Mike Brearley

Re: 'if exist' vbscript equivalent by Han

Han
Thu Aug 28 15:31:18 CDT 2003

Sounds like,

if createobject("scripting.filesystemObject").fileExists("c:/test.flg") then

"Mike Brearley" <mike_brearleyNOSPAM@DONTDOIThotmail.com> wrote in message
news:uba#1HabDHA.1832@TK2MSFTNGP09.phx.gbl...
> In batch files I often used something like:
> If Exist C:\test.flg then ...
> or
> If Not Exist C:\test.flg then ...
>
> What's the vbscript equivalent?
>
> --
> Posted 'as is'. If there are any spelling and/or grammar mistakes, they
> were a direct result of my fingers and brain not being synchronized or my
> lack of caffeine.
>
> Mike Brearley
>
>
>