Skip to main content
Solved

Fanout Text File Output to Folders...


Hi,

 

 

I am using the Text File writer, and wish to fanout output to files in different folders (where the file name in each folder is cosistent).

 

 

I have been able to do the opersite (i.e. fanout to uniquley named files in a single folder) using the Advanced>Fanout Datset settings.

 

 

Short of running from the command line, with a specified output folder parameter, is there any way I can dynamicaly direct Text File outputs to different folders? 

 

Best answer by takashi

Hi,

 

 

Probably this setting does the trick for what you need.

 

 

 

 

Takashi
View original
Did this help you find an answer to your question?

9 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • July 23, 2014
Hi,

 

 

Probably this setting does the trick for what you need.

 

 

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 23, 2014
You can use dataset fanout in conjunction with featuretypefanout (on writer).

 

This way you can use an output/fanout attributes you created to control it.

 

 


  • Author
  • July 23, 2014
Hi Takashi & Gio,

 

 

Thanks for your responses.

 

Takashi - your solution worked a treat! This will save me a cmd bat file to organise my files.

 

 

Cheers. Rob.

Forum|alt.badge.img
  • October 20, 2015
Hello,

 

 

I wish to output text files (it's a kind of Metadata) to various folders. My input has a folder named Forest and a subfolder named Native and inside Native I have my Native_Bush.TXT & Native_Trees.TXT( I have many other vegetation folders & subfolders & corresponding .TXT i.e Alpine/Plants/Alpine.TXT). I have many output folders to which i want to output my same Native_Bush & Native_Trees.TXT i.e Forest_1/ Native, Forest_2 /Native, Forest_3_Naive.

 

I have tried using the path C:/Forest/Native/*.TXT as a input & the  Parameter Fetcher & String replacer transformers (if I remember correctly)& using Fanout with the output C:/Forest_*/Native/*.TXT. It doesn't work

 

Do you know  how I could get it to work?

 

Thanks in advance.

 

Kind regards, 

 

Dianne

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • October 20, 2015
Hi Dianne,

 

 

If you create the required file paths without drive name for each text line feature as their attribute (e.g. "_file_path"), this Fanout Dataset setting might work.

 

 

 

The "_file_path" should store file path without drive name, e.g.

 

\\Forest_1\\Native\\Native_Bush

 

\\Forest_1\\Native\\Native_Trees

 

\\Forest_2\\Native\\Native_Bush

 

\\Forest_2\\Native\\Native_Trees

 

and so on.

 

 

Takashi

Forum|alt.badge.img
  • April 6, 2018
takashi wrote:
Hi,

 

 

Probably this setting does the trick for what you need.

 

 

 

 

Takashi
Which dialog box is this? On my Text Writer, I only get one setting which is the Fanout Expression.

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • April 6, 2018
takashi wrote:
Hi,

 

 

Probably this setting does the trick for what you need.

 

 

 

 

Takashi
Hi @peterx, the interface for Fanout Dataset has been changed drastically in 2016. Look at the date of the post. The dialog shown in the post above is from FME 2014.

 

The current FME Workbench has modern and smarter interface - the Fanout Expression.

 


dmerrick
Contributor
Forum|alt.badge.img+1
  • Contributor
  • May 24, 2018
takashi wrote:
Hi Dianne,

 

 

If you create the required file paths without drive name for each text line feature as their attribute (e.g. "_file_path"), this Fanout Dataset setting might work.

 

 

 

The "_file_path" should store file path without drive name, e.g.

 

\\Forest_1\\Native\\Native_Bush

 

\\Forest_1\\Native\\Native_Trees

 

\\Forest_2\\Native\\Native_Bush

 

\\Forest_2\\Native\\Native_Trees

 

and so on.

 

 

Takashi
Hi Takashi,

 

Could you show how it would work for FME 2018.0?

 

I am trying to insert disclaimers/metadata into zipped folders (kml.zip, shp.zip, dwg.zip etc) but I am unable to figure out the wildcard settings of the FileCopy Writer to do so.

 

Thanks,

 

Doug

 

 


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 25, 2018
dmerrick wrote:
Hi Takashi,

 

Could you show how it would work for FME 2018.0?

 

I am trying to insert disclaimers/metadata into zipped folders (kml.zip, shp.zip, dwg.zip etc) but I am unable to figure out the wildcard settings of the FileCopy Writer to do so.

 

Thanks,

 

Doug

 

 

Hi @dmerrick, if your requirement is to add a common "metadata" file to several existing zip archives (kml.zip, shp.zip, dwg.zip etc), the Fanout Dataset functionality may not be a solution. Please post your issue as a new question with more specific description on the conditions and requirements.

 


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