Question

Write the result on the same folder as the input


Badge

Hello

I have a work-space that is converting CVS files to SHP files. Right now the work-space creates all the SHP into a specific folder, but I need the SHP to be inside each of the folder that contains the CVS.

Current Situation

  • Root
    • Folder 1 (CVS)
    • Folder 2 (CVS)
    • Folder 3 (CVS)

       

    • ....
    • SHP 1, SHP 2, SHP 3...

Goal

  • Root
    • Folder 1 (CVS), SHP 1
    • Folder 2 (CVS), SHP 2
    • Folder 3 (CVS), SHP 3
    • ...

Best regards,

David


3 replies

Badge +3

usefull are file and directory Reader and FilenamePartExtractor.

Then fanned out writing of your shapes.

Either concatenate fanout attribute or use fan out for filename and fanout in navigator.

Badge

I have the the fanout Dataset active. This is where each SHP is assigned the name of the of the file based on attribute of the CVS file.

I split the FME_Dataset and concatenated to be at the fanout directory.

@Value(_listPathFile{0})\\@Value(_listPathFile{1})\\@Value(_listPathFile{2})\\@Value(_listPathFile{3})\\@Value(_listPathFile{4})\\@Value(_listPathFile{5})\\@Value(_listPathFile{6})\\

but it does not work.

Badge +22

Expose the fme_dataset, connect a FilenamePartExtractor (you only need the _dirname)

On the writer feature type set the shapefile name to the attribute from the CSV file.

On the writer parameters set the Destination Esri Shaepfile Folder to your root Directory.

Set Fanout Dataset to Yes and the Fanout Expression to @Value(_dirname)

Reply