Hi,
Since you are using Function and returning nothing to the function, you are getting that error.
If you use sub routine(sub) then you may not get the same error.
Here is the script i used to move a file from one location to another location. It worked fine for me.
Regards,
Uday.
Since you are using Function and returning nothing to the function, you are getting that error.
If you use sub routine(sub) then you may not get the same error.
Here is the script i used to move a file from one location to another location. It worked fine for me.
Code:
Drivespec="D:\abc\psychology.doc"
DestFolderPath= "F:\abc\ijk"
MoveAFile Drivespec,DestFolderPath
sub MoveAFile(Drivespec,DestFolderPath)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFile Drivespec,DestFolderPath
Set fso=nothing
End SubRegards,
Uday.

