Topic ""No matching file found""

Author Message
Uzmark

Guest


I have a weird issue.

Using the .NET assembly in a VB.NET application to download files from an sFTP server. It works fine but whenever there is a file with the character '[' in the filename, I get "No matching file found" error. It seems that it wont find the file on the remote server.

From the log:

2017-01-02 14:34:09.860 E[testfile].pdf;-;22546;2016-12-30T08:43:04.000Z;3;"" [0];"" [0];rw-rw----;0
< 2017-01-02 14:34:09.860 Script: No file matching 'E[testfile].pdf' found.

If I remove the [ charachter in the filename the file downloads fine.

Is there a limitation on having files with the '[' charachter in it?

Thanks
Uzz
Advertisements
Uzmark

Guest


Uzmark wrote:
I have a weird issue.

Using the .NET assembly in a VB.NET application to download files from an sFTP server. It works fine but whenever there is a file with the character '[' in the filename, I get "No matching file found" error. It seems that it wont find the file on the remote server.

From the log:

2017-01-02 14:34:09.860 E[testfile].pdf;-;22546;2016-12-30T08:43:04.000Z;3;"" [0];"" [0];rw-rw----;0
< 2017-01-02 14:34:09.860 Script: No file matching 'E[testfile].pdf' found.

If I remove the [ charachter in the filename the file downloads fine.

Is there a limitation on having files with the '[' charachter in it?

Thanks
Uzz


Anyone, please?

I tried to use the session.MoveFile command to remotley rename the file, but since the file cant be found (although it is there) when the [ character is in the filename, the command is unsuccesssful.

Kind regards
Uzz
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26109
Location: Prague, Czechia
You didn't show us your code.

So I can only guess that you didn't use the Session.EscapeFileMask to escape special characters in file name, before calling the Session.GetFiles:
https://winscp.net/eng/docs/library_wildcard
https://winscp.net/eng/docs/library_session_escapefilemask
Uzmark

Guest


martin wrote:
You didn't show us your code.

So I can only guess that you didn't use the Session.EscapeFileMask to escape special characters in file name, before calling the Session.GetFiles:
https://winscp.net/eng/docs/library_wildcard
https://winscp.net/eng/docs/library_session_escapefilemask


Thank you for pointing in the right direction Martin, I managed to resolve the issue.

Uzz
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License