hey all,
how do i check if a file exists and then if it does run a batch file?
thanks,
rodchar

Re: check for file by Ayush

Ayush
Thu Jul 26 20:59:13 CDT 2007

[rodchar] wrote-:
> hey all,
> how do i check if a file exists and then if it does run a batch file?
> thanks,
> rodchar

Set fs=CreateObject("Scripting.FileSystemObject")
If fs.FileExists("filepath") Then
CreateObject("WScript.Shell").Run "BatchFile.bat"
End If



Good Luck, Ayush.
--
Regular Expression Syntax : http://snipurl.com/RegularExpr_Syntax

Re: check for file by rodchar

rodchar
Thu Jul 26 21:28:00 CDT 2007

thank you.

"Ayush" <"ayushmaan.j[aatt]gmail.com" wrote:

> [rodchar] wrote-:
> > hey all,
> > how do i check if a file exists and then if it does run a batch file?
> > thanks,
> > rodchar
>
> Set fs=CreateObject("Scripting.FileSystemObject")
> If fs.FileExists("filepath") Then
> CreateObject("WScript.Shell").Run "BatchFile.bat"
> End If
>
>
>
> Good Luck, Ayush.
> --
> Regular Expression Syntax : http://snipurl.com/RegularExpr_Syntax
>

Re: check for file by Ayush

Ayush
Fri Jul 27 23:59:50 CDT 2007

[rodchar] wrote-:
> thank you.

You're welcome

Good Luck, Ayush.
--
Scripting Home : http://snipurl.com/Scripting_Home