Dec 22, 2004 #1 mlabac Programmer Jan 22, 2004 23 US I need to append a footer (1 field as a string) to the last line in an existing text file that i have exported via DTS. I have been looking at the Writefile transformation but can't seem to get it to work. Thoughts
I need to append a footer (1 field as a string) to the last line in an existing text file that i have exported via DTS. I have been looking at the Writefile transformation but can't seem to get it to work. Thoughts
Dec 22, 2004 #2 yksvaan Technical User Oct 19, 2004 261 GB Writefile transformation is not for this purpose. Since it's late, I won't start thinking of possible solutions. How about the old fashin way, Windows command: echo This is the last line of the file >> myfile.txt Cheers [blue]Backup system is as good as the latest recovery[/blue] Upvote 0 Downvote
Writefile transformation is not for this purpose. Since it's late, I won't start thinking of possible solutions. How about the old fashin way, Windows command: echo This is the last line of the file >> myfile.txt Cheers [blue]Backup system is as good as the latest recovery[/blue]
Dec 22, 2004 1 Thread starter #3 mlabac Programmer Jan 22, 2004 23 US Figured it out...pretty easy Wrote an ActiveX script from DTS Set fso = CreateObject("Scripting.FileSystemObject") Set f = fspenTextFile(Path, ForAppending, False) f.Write strFooter f.Close Appends the string 'strFooter' to the last line in the text file. Upvote 0 Downvote
Figured it out...pretty easy Wrote an ActiveX script from DTS Set fso = CreateObject("Scripting.FileSystemObject") Set f = fspenTextFile(Path, ForAppending, False) f.Write strFooter f.Close Appends the string 'strFooter' to the last line in the text file.
Dec 22, 2004 #4 yksvaan Technical User Oct 19, 2004 261 GB That was my other suggestion, I was too tired to start writing it. Star for you, since you found the solution. Cheers [blue]Backup system is as good as the latest recovery[/blue] Upvote 0 Downvote
That was my other suggestion, I was too tired to start writing it. Star for you, since you found the solution. Cheers [blue]Backup system is as good as the latest recovery[/blue]