we have a process that drop off file daily to a specific folder on the network. The filename change each day. For example, today file is c:\Test\Employee07132009.xls. Tomorrow file will be c:\Test\Employee07142009.xls. How can I change the file name to c:\Test\Employee.xls. I'm using the ActiveX Script Task in SSIS 2005 with the following code but it does not work
Function Main()
Dim fso_obj,NFN
Set fso_obj = CreateObject("Scripting.FileSystemObject")
set NFN = "Employee"
fso_obj.MoveFile "C:\Test\*.xls", "C:\Test\" & NFN & ".xls"
Set objFSO = Nothing
Main = DTSTaskExecResult_Success
End Function
your help is greatly appreciated.
Thanks
Function Main()
Dim fso_obj,NFN
Set fso_obj = CreateObject("Scripting.FileSystemObject")
set NFN = "Employee"
fso_obj.MoveFile "C:\Test\*.xls", "C:\Test\" & NFN & ".xls"
Set objFSO = Nothing
Main = DTSTaskExecResult_Success
End Function
your help is greatly appreciated.
Thanks