Hi.
I am trying to retrieve files from a folder using the script task functionality in SSIS.
I have created a variable called ExcelFolder which contains the path of the files. In the script task, I have used the code as below
// ExcelFolder contains value as D:\test\folder1\
excelFolder = Dts.Variables["ExcelFolder"].Value.ToString();
var directory = new DirectoryInfo(excelFolder);
FileInfo[] files = directory.GetFiles(excelFolder);
I am getting error in the files line as - Second path fragment must not be a drive or UNC name.\r\nParameter name: path2
How to fix this?
Thanks