Skip to content
Advertisement

SSIS Script C# Script Task to Add current date to a file using a variable

Im have this script to add current year month to a file in a directory. It works perfect with the directory path, but I want to change the directory patch for a variable, because every month its going to be in a different folder. I already have the variable with the directory to use. But what I dont know how to do is, use the variable instead of the directory

Advertisement

Answer

Create a variable in your SSIS package. In the script task ReadOnlyVariables select User::varDir. C# code call the read only variable. You can write the expression for this variable to point to the appropriate directory each month.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement