Support Questions

Find answers, ask questions, and share your expertise

Copy Folders with Nifi

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

@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

@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.

@David Williamson

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

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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.