Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to provide the path in NiFi FetchFile processor

avatar

I have few files as follows.

/a/b/c/1.txt

/a/b/c/2.csv

/a/b/c/3.csv.gz

I need to fetch all these files using FileFetch processor. What should be the expression in the 'File To Fetch' property?

1 ACCEPTED SOLUTION

avatar
Guru

You should place a ListFile processor in front of you FetchFile.

Alternatively, you could use GetFile, with these properties:

Input Directory: /a/b/c

File Filter: [^\.].* (or change regex if you are filtering specific files by filename pattern)

Note that GetFile does not have the configuration to move the file after processing (creating flowfile)

View solution in original post

3 REPLIES 3

avatar
Guru

You should place a ListFile processor in front of you FetchFile.

Alternatively, you could use GetFile, with these properties:

Input Directory: /a/b/c

File Filter: [^\.].* (or change regex if you are filtering specific files by filename pattern)

Note that GetFile does not have the configuration to move the file after processing (creating flowfile)

avatar

Thanks for the response Greg. My actual problem is to check for files in a directory and send an email notofication is there are none. Could you please suggest me something?

avatar
Guru

@NAVEEN KUMAR I would post that as a separate question, since it is different from the question you posed. (You will also get more exposure)