Skip to main content
Question

Bulk Renaming of Files - Not Sure Why It's Not Working


stefan_kutac
Contributor
Forum|alt.badge.img+4

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

2 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • November 3, 2021

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


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • November 5, 2021

@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


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