Hello,
I'm new to VB and have a pretty simple task that I need some help with. I'm building a visual studio DTSX package and I need to create new text files from scratch, and name them with today's date minus 7 days. So here's the code I have for creating a new text file, which works fine:
Dim file As System.IO.FileStream
file = System.IO.File.Create("d:\test.txt")
The problem I'm having is renaming the files (there will be two. I don't know what the script would look like for this. I want to create a seperate script for renaming the files, and they should be named something like:
CustData June 22,2011
TransData June 22,2011
The CustData and TransData part of the name will always be the same - so the only thing that will change is the date. So if the task runs tomorrow, the names should be:
CustData June 23,2011
TransData June 23,2011
And so on.
Thanks!
I'm new to VB and have a pretty simple task that I need some help with. I'm building a visual studio DTSX package and I need to create new text files from scratch, and name them with today's date minus 7 days. So here's the code I have for creating a new text file, which works fine:
Dim file As System.IO.FileStream
file = System.IO.File.Create("d:\test.txt")
The problem I'm having is renaming the files (there will be two. I don't know what the script would look like for this. I want to create a seperate script for renaming the files, and they should be named something like:
CustData June 22,2011
TransData June 22,2011
The CustData and TransData part of the name will always be the same - so the only thing that will change is the date. So if the task runs tomorrow, the names should be:
CustData June 23,2011
TransData June 23,2011
And so on.
Thanks!