I have the following code which works... usually....... at times it seems it will not map the network drive and copy the file. is there a better way? a more reliable method? TIA Rick
Dim objNetwork sSaveName = "PS_Project_Rpt.xls" sSavePath = "D:\Apps\https\" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objNetwork = CreateObject("Wscript.Network") If objFSO.DriveExists("Z:") = True Then objNetwork.RemoveNetworkDrive "Z:" End If objNetwork.MapNetworkDrive "Z:", "\\UsMyserver\data", True ,"UsMyserver\mylogin","Mypass"
Simple enough to do! I'll give it a try and see if it helps. thx. Is there a wait while busy like with IE? objNetwork.busy ? Do While (oIE.Busy)' Important: wait till MSIE Is ready 'WScript.Echo "....." WScript.Sleep 200 Loop