itsmarkdavies
Programmer
I am running an VBScript ActiveX script from a SQL Server 2000 Job Step. The Job runs fine and reports success, but the file I am trying to move does NOT move. Can anyone spot a flaw in my Script ?. Any ideas much appreciated.
Script is as follows :-
Function STAMP
STAMP = FormatDateTime(Date, 1)
Call Archive "\\SERVER1\c$\bills.txt"
End Function
Function Archive(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject"
If (fso.FileExists(filespec)) Then
fso.MoveFile filespec, "\\SERVER1\c$\archive\bills"
& STAMP & ".txt"
End If
Set fso = Nothing
End Function itsmarkdavies@hotmail.com
Script is as follows :-
Function STAMP
STAMP = FormatDateTime(Date, 1)
Call Archive "\\SERVER1\c$\bills.txt"
End Function
Function Archive(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject"
If (fso.FileExists(filespec)) Then
fso.MoveFile filespec, "\\SERVER1\c$\archive\bills"
& STAMP & ".txt"
End If
Set fso = Nothing
End Function itsmarkdavies@hotmail.com