Skip to main content

Hi all,

 

 

According to the docs you have lots of wildcard options available in the"file and directory pathnames reader" ("add reader->Format: Directory and files pathnames). Including greedy searching all subdirectories recursively or fine-grained, hairsplitting controlled directory and file name searching.

 

http://docs.safe.com/fme/reader_writerPDF/path.pdf

 

 

So this kind of structure really should be a breeze: C:\\data2\\dirB\\dirB_1\\Newfeature.txt

 

C:\\data2\\dirB\\dirB_2\\Newfeature.txt

 

C:\\data2\\dirB\\dirB_3\\Newfeature.txt

 

(somewhat simplified).

 

 

 

So I set the source directory to C:\\data2\\dirB and fiddle with the Path filter syntacts.

 

**\\*

 

C:\\data2\\dirB\\**\\*

 

C:\\data2\\dirB\\dirB_?\\*

 

 

None of these work. No, I am not kidding. Go to the PDF I linked, scroll down to the heading Path filter. Then please explain me why.

 

 

What DOES work is moving most of those wildcard into the definition of the Source Directory. These definitions are valid for my example:

 

C:\\data2\\dirB\\**\\

 

C:\\data2\\dirB\\dirB_?\\

 

 

Apparently, the path filter is only usable to provide more fine grained control over the file name only. This separation (directory definition here, file name definition there) is actually logical and intuitive - I like it - but a) the name path filter is highly misleading and b) i beg you:

 

 

Please, please, pretty please update the documentation

 

Hi,

 

 

I think you should send this directly to Safe support.

 

 

David
To simplify things further: You could simplify this A LOT by getting rid of  the path filer parameter all together. Put the entire search into the path definition, such as

 

 

C:\\data2\\dirB\\dirB_?\\*.txt 

 

 


I am sure the fine folks at Safe are capable of doing that themselves. Or if you'd like to, feel free to post it yourself.

 

 

Right now, I can't be bothered - it is weekend time and dinner preparation,  starting NOW! Cheers! :) 
Thanks Hektopascal, your insight helped me.

 

 

I'm new and figuring out the differences between the path filter, the path definition (source directory and file pathnames directory), and the merge feature type's merge filter is proving rather confusing.

 

 

But I was able to read my desired files (.TAB files) within the current directory and all sub-directories, by using:

 

 

a path filter of "\\\\networkpath\\subfolder\\**"

 

and a path filter of "*.TAB"

 

and a merge filter of "*.TAB"

Improvements have been made to the Directory and File Pathnames Reader Parameters documentation. The doc suggests to use forward slashes (/) as separators, as they do not conflict with either glob escape characters or UNC path names. Single backward slashes (\\), for example C:\\data\\*.dgn, may be treated as escape characters, leading to incorrect interpretations. Please take a look at the section Common Path Filter Issues for troubleshooting assistance.

Kind regards,

 

Natalie

Reply