Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

coderdave

Like I mentioned in my post, ... the file mask we are using is *.*. The file listed in the error is among the files that it was pulling and is the one that caused WinSCP to throw the error. Thank you for the confirmation that this issue has been addressed. Are there any valid filename characters that would still cause an issue like this? Or does your fix allow all valid filename characters now?
coderdave

EnumerateRemoteFiles and invalid character in filename

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()