VB Code:
Option Explicit Sub main() ' On Error Resume Next FileCopy "g:\files\sales\rep3\1036\toolbox\toolbox.exe", _ "C:\Program Files\toolbox\toolbox.exe" Test "g:\files\sales\rep3\1036\sdtcost", _ "C:\Program Files\toolbox\sdtcost" Shell "C:\Program Files\toolbox\toolbox.exe", vbMinimizedFocus End Sub Function Test(SeverFolder As String, DestFolder As String) Dim oFileSystem Set oFileSystem = CreateObject("Scripting.FileSystemObject") oFileSystem.CopyFolder SeverFolder, DestFolder, True Set oFileSystem = Nothing End Function
The g:\ does not exist.. so i should get the second error al least..
but i dont..




Reply With Quote