Skip to main content
Question

Copy/rename data files from one environment to another

  • December 12, 2017
  • 2 replies
  • 11 views

At the end of our fiscal year, I would like to take the data that has "2018" in the title (a couple of feature classes and around 70 tables) and rename them to replace 2018 with 2019. Going from our production environment to our development environment. Using the readers and writers I see it can happen but I would need to manually edit the year. Is there an automated method that would replace the year in the title of each data file? I have not used FME before so this is all new to me.

2 replies

danilo_fme
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • December 12, 2017

Hi @mrb11,

I believe that you need to expose the format attribute fme_basename:

After use the transformer StringReplacer and work with the attribute fme_basename it did enable before:

In Writer is necessary to select on Feature Type to select the attribute fme_basename and the navigator select the Fanout Expression:

Thanks,

Danilo

 

 


takashi
Evangelist
  • December 15, 2017

If the "title" in your description means file name, i.e. if you just want to copy files under a folder to another folder replacing "2018" within their file names with "2019", you can use the "Directory and File Pathnames" reader, some transformers to perform string operations, and the "File Copy" writer effectively.


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