Avatar of onesegun
onesegun
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

SSIS: Use Variable in C# Script task

Hi there,

How can I pass the following user defined variable to a C# script task. It's basically the folder path:

User defined variable is:
User::Source_Folder = \\14.100.26.12\dashboard

Open in new window


and the C# code I want to replace it with is the path as indicated below:
        public void Main()
        {
            string[] files = System.IO.Directory.GetFiles(@"\\14.100.26.12\dashboard", "AGINGANALYSIS*.txt", System.IO.SearchOption.TopDirectoryOnly);
            System.IO.FileInfo finf;

Open in new window


Thanks,

OS
Microsoft SQL Server 2008SSIS

Avatar of undefined
Last Comment
onesegun

8/22/2022 - Mon