I am trying to write a vbs to copy the latest modified files to another location. The script goes like this
Option Explicit
Dim oFSO, oFolder, oFile
Dim vSourcePaths ,vDestinationPaths
vSourcePaths = "C:\xampp\htdocs\lgmsuploads"
vDestinationPaths = "S:\LGMSUPLOADS"
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFolder = oFSO.GetFolder(vSourcePaths)
For Each oFile In oFolder.Files
If oFile.DateLastModified < DateAdd("h", -24, Now) Then
oFSO.CopyFile vSourcePaths & "\" & oFile.Name, vDestinationPaths & "\" & oFile.Name
End If
Next
But this gives the following error

Please help...