July 21, 2014 at 10:58 am
I need some help in coding for a script task for a SSIS package.
I have a folder called TestFile in D:\, and I am placing a text file with the name starting with E, and want to rename it as testfileYYYMMDD.txt.
So, here is what I try to write for the script task:
Public Sub Main()
Dim sSourceFile As String
Dim sDestinationFile As String
sSourceFile =
sDestinationFile = "D:\Test\TestFile" + Date.Now.ToString("yyyyMMdd") + ".txt"
'System.IO.File.Move(sSourceFile, sDestinationFile)
System.IO.File.Move(sSourceFileA, sDestinationFileA)
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
Can somebody help me with the "sSourceFile=" portion.
Thanks,
July 21, 2014 at 11:12 am
Duplicate post, please post replies here, http://www.sqlservercentral.com/Forums/Topic1594697-391-1.aspx
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply