Skip to main content

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.

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.


Reply