cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

File Poller: Get files without extension

abjoe
New Contributor II

Hi All,

I am using a file poller snap. In the file filter, what should I give so that I get files with no extensions?

image

So if I use *.txt I get text files. Similarly, to get files without any extension, what should I give? The folder that I am searching will be having many files with extensions. I just want the files without any extensions.

Thanks in Advance!

4 REPLIES 4

Surendar
Contributor

Just use * (asterisk) in file filter, it will give you all the file extensions from the directory.

abjoe
New Contributor II

Hiโ€ฆ I donโ€™t want all the filesโ€ฆ I want only the files which do not have any extensionsโ€ฆ Many of the files in that folder do not have any extension. I just want those files.

tstack
Former Employee

Not sure itโ€™s really possible with just the FilePoller, you might want to put a Filter snap right after the poller and set it filter out documents where the file name contains a dot.

del
Contributor III

@abjoe, Just for practice, I played around with Directory Browser filter (which uses GLOB patterns like the File Poller Filter) and came up with a filter that works partially in my testsโ€ฆ I donโ€™t know how reliable it will be for you, so tstackโ€™s suggest is likely a better option.

*[!.]???

The two issues I found with this filter are

  • it requires all extensions to be exactly 3 characters (i.e. works with .txt but not .json)
  • it will not pull in non-extension filenames with a filename less than 4 characters long