Cannot copy using Scripting.FileSystemObject on Windows Server 2003
Posted on 2007-03-23
I have an app which works as it should in Windows XP pro but when i run it on a sever running Windows Server 2003, it does not work, nor does it give an error. The piece of code that does not work is as follows:
Dim fso As Object
Dim strFromFile As String
Dim strToFile As String
' strProcessPath is passed to function after it is tested as valid
' Copy file to Dir
strFromFile = Trim(App.Path) & "\SystemConfig.zip"
strToFile = Trim(strProcessPath) & "\SystemConfig.zip"
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile Trim(strFromFile), Trim(strToFile)
Set fso = Nothing
Thanks for your help