cancel
Showing results for 
Search instead for 
Did you mean: 

Directory Browser match on file name with spaces

tk42
New Contributor III

I have a file called “File With Spaces.csv” and am trying to create a GLOB pattern to match it in a Director Browser.

What should work does not work and what does work is not optimal in my opinion.

Simply setting the File Filter to the value: File With Spaces.csv
returns 0 documents.

Setting the filter to: File?With?Spaces.csv
returns 0 documents.

Setting the filter to: File*With*Spaces.csv
returns the 1 document.

The fact that it will not match the exact file name is perplexing.
The fact that ‘?’ has no effect is perplexing as well.
At least ‘*’ works, but I find that pattern problematic and should not be necessary.

I can find no where in the documentation that spaces require special handling.

Anyone know of solution that does not require the use of ‘*’ for this?

TK

3 REPLIES 3

tk42
New Contributor III

Actually it looks like using %20 works for the space character matching.

Perhaps it has to do with the fact that I am browsing an SFTP directory?

Seems reasonable but kind of violates the Principal of Least Surprise.

TK

Rakesh
Employee
Employee

Try enabling expressions by clicking the “=” button and entering the name of the file within quotes: “File With Spaces.csv”.

That should do the trick.

tk42
New Contributor III

Hi Rakesh,

“File With Spaces.csv” does not work either, but using “File%20With%20Spaces.csv” does the trick.

File???With???Spaces.csv also does the trick (as quoted expression or not), so it is clear now that it has to do with the encoding from the sftp server.

TK