I want the script to check to see if the shared drive exist .. I can do that with a dive.isready BUT if it is not than I want to create a batch file with a one line command THAN run that batch file to connect. PROBLEM: it appears that the batch file is trying to run before it has a chance to create it ... TIMER? HELP Thanks
Set FileObject = CreateObject("Scripting.FileSystemObject"
'Create the DOS batch file which connects to a shared drive
Set objTextFile = FileObject.CreateTextFile("C:\ConnectBillingShare.bat"
objTextFile.WriteLine "net use T: \\someserver\Billing_Files"
objTextFile.Close
' Run the batch file to connect to a shared drive to the billing files located on IDXRADrpt share name Billing_files
Set Shell = CreateObject("WScript.Shell"
Shell.Run "C:\ConnectBillingShare.bat"
Set FileObject = CreateObject("Scripting.FileSystemObject"
'Create the DOS batch file which connects to a shared drive
Set objTextFile = FileObject.CreateTextFile("C:\ConnectBillingShare.bat"
objTextFile.WriteLine "net use T: \\someserver\Billing_Files"
objTextFile.Close
' Run the batch file to connect to a shared drive to the billing files located on IDXRADrpt share name Billing_files
Set Shell = CreateObject("WScript.Shell"
Shell.Run "C:\ConnectBillingShare.bat"