Auerelio Vasquez
asked on
Using SSIS Script Task to Check if a file exists (using C# scripting language)
i'm trying to use script task to check if a file exits. I've done this before, but it was using visual basic script. our packages are set up using C#.
this is what i have in vb (need to convert to c#)
Public Sub Main()
Dts.Variables("v_bolFileEx ists").Val ue = File.Exists(Dts.Variables( "v_zipFile Archived") .Value)
'
Dts.TaskResult = ScriptResults.Success
End Sub
this is what i have in vb (need to convert to c#)
Public Sub Main()
Dts.Variables("v_bolFileEx
'
Dts.TaskResult = ScriptResults.Success
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Pragmatic Works has a suite of custom SSIS components called Task Factory, and the File Properties task will check to see if any path-file exists, and store the result in a variable for later use. The license is about a grand per enviroment, but if you have multiple SSIS needs chances are this product meets a bunch of them.