We are using WinSCP v5.19.3 in an SSIS package on SQL Server 2019 to download files from an FTP source to a local folder. The file mask we are using is
*.*
in this case so we are using
EnumerateRemoteFiles
. When a filename contains a
)
we are getting an error returned from WinSCP that looks like the below. My question is, has this problem been fixed in the latest version? The problem being that WinSCP has issues with some characters in filenames that are valid filename characters. We are trying to determine whether we upgrade to the latest version or switch to another package that doesn't have this issue.
Here is the error:
ErrorDescription: Error in script task Get list of remote files: System.ArgumentException: parsing "^20250217_UHC)S5667550_21425[.]dat$" - Too many )'s.
at System.Text.RegularExpressions.RegexParser.ScanRegex()
at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options)
at WinSCP.Session.MaskToRegex(String mask)
at WinSCP.Session.EnumerateRemoteFiles(String path, String mask, EnumerationOptions options)
at ST_fe3fb781add94611b3af8496ec86bdb6.csproj.ScriptMain.Main()