I'm trying to add a activex script to my DTS package.
This package will move the files toa ftp site and another folder. The code in vbscript keeps giving a error message (expected end of statement line 3)
here is the code:
Public sub main()
'Copy files from D:\IMS_FTP to D:\IMS_OUTPUT.
Dim oPackage As DTS.Package
Dim oStep As DTS.Step
Dim oTask As DTS.Task
Dim oCustTask As DTSCustTasks.DTSFTPTask
'get the date to add to filename
dim ms_month as string
dim ms_day as string
dim ms_year as string
dim ms_Date as string
ms_month = month(date)
ms_day = day(date)
ms_year = year(date)
'final date format to added to filename
ms_Date = ms_year & ms_month & ms_day
Set oPackage = New DTS.Package
oPackage.FailOnError = True
'Create step and task, link step to task.
Set oStep = oPackage.Steps.New
oStep.Name = "FTPSrcDirStep"
Set oTask = oPackage.Tasks.New("DTSFTPTask")
Set oCustTask = oTask.CustomTask
oCustTask.Name = "FTPSrcDirTask"
oStep.TaskName = oCustTask.Name
Set oStep = Nothing