Hi I am trying to rename the file and move it to a variable in script task getting the file name from the for each loop
"DestinationFilePath" is a variable where file path is located and i want to rename date as prefix to the file like 20101410_Filename.csv and write it to the variable "ReNameFile"
the code below works good by replacing the extension of the file which was easy becos i know all files are .csv files but the file names are different so i dint know how to get date as prefix can some one help me with this issue please.
Public Sub Main()
' Add your code here
Dts.Variables("ReNameFile").Value = Dts.Variables("DestinationFilePath").Value.Replace(".csv", "_" + Today() + ".csv").Replace("/", "")