fikir
Programmer
- Jun 25, 2007
- 86
I am trying to append a file to existing text file in DTS and wrote this VB script
but it is coplainign that on this line of code
openFile = oFSO.OpenTextFile("U:\Archive\muk", ForReading, True)
it is saying that object doesn't support this property or method
Is there any wrong in my script?
Thanks
Code:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim oFSO
Dim openFile
Dim readFile
Dim finalFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
finalFile = oFSO.OpenTextFile("U:\Archive\DestinationFile.txt", ForAppending, True)
openFile = oFSO.OpenTextFile("U:\Archive\muk", ForReading, True)
readFile = openFile.ReadAll()
finalFile.write(readFile)
openFile.close()
finalFile.close()
oFSO.DeleteFile sSourceFile
Set oFSO = Nothing
Main = DTSTaskExecResult_Success
End Function
but it is coplainign that on this line of code
openFile = oFSO.OpenTextFile("U:\Archive\muk", ForReading, True)
it is saying that object doesn't support this property or method
Is there any wrong in my script?
Thanks