Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Copy Folders with Nifi

avatar

Is there a way to copy and retain recursive folder structure using Nifi? I am able to copy individual files, but it would be great to be able to copy subfolders.

1 ACCEPTED SOLUTION

avatar

@David Williamson

If you are using GetFile and PutFile processors to copy individual files, they can also be used for recursive folder structure.

One of the attributes written by GetFile is the folder path of the file, so you can use PutFile to create the folder structure in the new location.

View solution in original post

3 REPLIES 3

avatar

@David Williamson

If you are using GetFile and PutFile processors to copy individual files, they can also be used for recursive folder structure.

One of the attributes written by GetFile is the folder path of the file, so you can use PutFile to create the folder structure in the new location.

avatar

@David Williamson

Yes, the ListFile writes the same attributes. But, make sure the user running NiFi has the permissions to create directories in HDFS.

avatar

Sorry, I should have clarified this some more. I am currently using ListFile, FetchFile, and PutHDFS. Do the same settings apply?