Skip to main content
Solved

FileCopy

  • September 27, 2016
  • 6 replies
  • 73 views

Forum|alt.badge.img

Hi again ,

One question please , any idea to how generate a workspace that takes files from a source directory , and put this files in a destination directory configured in a text file.

I'll explain better : I have a fme diagram that converts v7 to v8 of microstation , the input is in a input directory and the ouput in a ouput directory , all it's OK , but now I need a system , that take the files from the ouput directory and move them to another directory that is configured in a text file.

I know that using fileCopy writer and path reader this is posible , but I don't know how to configure the FME for than the final destination directory takes it from a text file .

Any idea ???.

Thanks for your help !!

Best answer by xavigarciamar

Finally I have been able to do it , I post it for if helps to anybody !!

The solution that I have used is :

1 -. A path reader and a File text reader

2 -. Any of this reader elements are passed to attribute creator to create a attribute called key_unique to be able to do the merge , and like I only have one line for the text file , there is no problem. The key unique , always have value = 1

3 -. I use to the exit of atribute creators a featuremerger for any file of the input directory

4 -. Finally I use a attributerenameer connected to filecopy to take the attributes to configurate the filecopy

And it's finish , it move all the elements of a input directory to a directory configured in text file.

Thanks itay and jero for your help !!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

Forum|alt.badge.img+7

Hi @xavigarciamar

Since you now already you should take a look at the FileCopy writer and the Path Reader, I will not go into their specific configuration.

In order to use the destination path from the text file, just create a text reader that reads this file and send the feature (I suppose there is only 1) to the suppliers port of a FeatureMerger. The features read by the Path Reader should go to the Requestor.

 

When you 'join on' requestor: '1' and supplier: '1', every feature read by the path reader will get the destination path from the text reader.

Now you can use this path in the FileCopy writer.

Good luck!


Forum|alt.badge.img

Hi @xavigarciamar

Since you now already you should take a look at the FileCopy writer and the Path Reader, I will not go into their specific configuration.

In order to use the destination path from the text file, just create a text reader that reads this file and send the feature (I suppose there is only 1) to the suppliers port of a FeatureMerger. The features read by the Path Reader should go to the Requestor.

 

When you 'join on' requestor: '1' and supplier: '1', every feature read by the path reader will get the destination path from the text reader.

Now you can use this path in the FileCopy writer.

Good luck!

Hi Jero ,

Ok , many thanks for the help !!

I 'll try and I say you something , thanks again !!


Forum|alt.badge.img

Hi Jero ,

there is something that I can't do , the configuration of the feature merger and the path reader and text reader is OK , but how can I configure the attributes of the filecopy ??? the filecopy_source_dataset ,filecopy_dest_dataset , and the filecopy_dest_filename ??

Sorry for the question I'm begining with FME ,

Thanks again for your help !!


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • September 28, 2016

Hi Jero ,

there is something that I can't do , the configuration of the feature merger and the path reader and text reader is OK , but how can I configure the attributes of the filecopy ??? the filecopy_source_dataset ,filecopy_dest_dataset , and the filecopy_dest_filename ??

Sorry for the question I'm begining with FME ,

Thanks again for your help !!

 

Hi @xavigarciamar possibly this old blog post might help you:

 

http://blog.safe.com/2013/07/fmeevangelist117/

Forum|alt.badge.img

thanks for your always apreciate help Itay , I will look it !!


Forum|alt.badge.img
  • Author
  • Best Answer
  • September 28, 2016

Finally I have been able to do it , I post it for if helps to anybody !!

The solution that I have used is :

1 -. A path reader and a File text reader

2 -. Any of this reader elements are passed to attribute creator to create a attribute called key_unique to be able to do the merge , and like I only have one line for the text file , there is no problem. The key unique , always have value = 1

3 -. I use to the exit of atribute creators a featuremerger for any file of the input directory

4 -. Finally I use a attributerenameer connected to filecopy to take the attributes to configurate the filecopy

And it's finish , it move all the elements of a input directory to a directory configured in text file.

Thanks itay and jero for your help !!