Skip to main content
Question

Using FileCopy Writer to copy single file to multiple subfolders


I have managed to use The Directory and File Pathnames reader, Attribute Manager and File Copy Writer to copy a file from one location to another.

 

How would I be able to copy that same file into multiple subfolders of a single parent folder?

 

I used this method so far.

2 replies

kailinatsafe
Safer
Forum|alt.badge.img+21

Hello @nickj​, thanks for posting. Would you mind taking a look at the attached workspace? Here, we use a PATH reader to read the file being copied into each subdirectory (could also use a Creator/AttributeCreator to do the same thing)! A second PATH reader is used to grab a list of subdirectories you'd like to copy the file too. Using an AttributeCreator, we grab the subdirectory names and create a new attribute called 'destination_directory'. A FeatureJoiner is used to create 1 feature per subdirectory, and then a FileCopy Writer in fanout mode (fanout = destination_directory) can deliver the files to each subfolder. Let me know if you have any questions about the process! Happy to help, Kailin.


sveouu
Contributor
Forum|alt.badge.img+3
  • Contributor
  • April 16, 2025
kailinatsafe wrote:

Hello @nickj​, thanks for posting. Would you mind taking a look at the attached workspace? Here, we use a PATH reader to read the file being copied into each subdirectory (could also use a Creator/AttributeCreator to do the same thing)! A second PATH reader is used to grab a list of subdirectories you'd like to copy the file too. Using an AttributeCreator, we grab the subdirectory names and create a new attribute called 'destination_directory'. A FeatureJoiner is used to create 1 feature per subdirectory, and then a FileCopy Writer in fanout mode (fanout = destination_directory) can deliver the files to each subfolder. Let me know if you have any questions about the process! Happy to help, Kailin.

Dear Kailin, Would you mind sharing the workspace again.
I think I have solved the issue I am having given your description of the workspace but would like to double check the logic :) thank you,
Svea


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings