Skip to main content

Hello FME Community! Year long learner, first time poster, please go easy on me.

 

I've been trying to add a prefix to all files within a directory. I have searched the forums for answers, and have tried a few different suggestions from previous posts but for some reason, my files don't get renamed.

 

In this example, I would like to add "2022-" as a prefix to all filenames in a folder.

 

So far, I have used the "Directory and File Pathnames" Reader with the following settings:

01-ReaderNext, I have used the Attribute Manager to change the filename properties:

02-AttributeManagerFinally, using the File Copy Writer to put the files into the same directory:

03-WriterI can't figure out which settings may be wrong or not completed properly. Thanks in advance for any help or tips!

 

Stefan


https://community.safe.com/s/question/0D54Q000080hKw8SAE/quick-way-too-rename-files-for-noobs

You need to set the filecopy_source_dataset, filecopy_dest_dataset and filecopy_dest_filename as described in the answer you've linked

 

These are the attributes that are important for the filecopy writer, path_filename is not used


@ebygomm​ has the correct solution here - but to illustrate it I made this one of my question-of-the-week and added it to a video here: https://youtu.be/uyF7MEuBdK0


Reply