Skip to main content
Solved

Am I using FileCopy correctly?

  • November 8, 2019
  • 5 replies
  • 93 views

nicholas
Contributor
Forum|alt.badge.img+14

I have a workbench that writes three mapinfo tables to a folder on one file server which I then want to filecopy the mapinfo tables to a folder on a different file server.

I think I've got it to work, but I wanted to confirm.

I use three FeatureWriters to write the mapinfo tables to a folder on the first file server. Then all three FeatureWriters go to a single FileCopy transformer.

The parameters for the FileCopy are;

Destination File Copy Folder = folder on first file server

filecopy_source_dataset = folder on first file server

filecopy_dest_dataset = folder on second file server

filecopy_dest_filename = <blank>

Is this correct?

I have the address of the first file server in twice, once for the Destination File Copy Folder and again for filecopy_dest_dataset. Do I really have to enter this twice?

filecopy_dest_filename is blank, which means I get a red arrow. But it runs anyway. Should I really leave this blank?

It all seems to work, but it feels like I have not configured it correctly

Best answer by jdh

The attribute filecopy_source_dataset is the only required attribute. You do need to put a value in the Destination File Copy Folder parameter, it may not be used, see below.

 

 

If present, the filecopy_dest_dataset overrides the value specified in the the Destination File Copy Folder parameter on the writer.

 

 

By default the filename of the output file is the same as the input filename, however if the filecopy_dest_filename is present, then it will rename the file to that value.
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.

5 replies

david_r
Celebrity
  • 8394 replies
  • November 8, 2019

I don't think that you'll have to specify the "Destination file copy folder" at all, as far as I can tell from the documentation only the three filecopy_* attributes are actually used (filecopy_dest_filename is optional).

http://docs.safe.com/fme/2019.1/html/FME_Desktop_Documentation/FME_ReadersWriters/filecopy/filecopy.htm


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3434 replies
  • November 8, 2019

I don't think that you'll have to specify the "Destination file copy folder" at all, as far as I can tell from the documentation only the three filecopy_* attributes are actually used (filecopy_dest_filename is optional).

http://docs.safe.com/fme/2019.1/html/FME_Desktop_Documentation/FME_ReadersWriters/filecopy/filecopy.htm

You have to have a value as a destination file copy folder but as far as i can tell this value isn't actually used/referenced at all, and can be set to 'x' or similar, it doesn't have to be a folder location.


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • Best Answer
  • November 8, 2019

The attribute filecopy_source_dataset is the only required attribute. You do need to put a value in the Destination File Copy Folder parameter, it may not be used, see below.

 

 

If present, the filecopy_dest_dataset overrides the value specified in the the Destination File Copy Folder parameter on the writer.

 

 

By default the filename of the output file is the same as the input filename, however if the filecopy_dest_filename is present, then it will rename the file to that value.

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • November 8, 2019

The attribute filecopy_source_dataset is the only required attribute. You do need to put a value in the Destination File Copy Folder parameter, it may not be used, see below.

 

 

If present, the filecopy_dest_dataset overrides the value specified in the the Destination File Copy Folder parameter on the writer.

 

 

By default the filename of the output file is the same as the input filename, however if the filecopy_dest_filename is present, then it will rename the file to that value.

So if you are copying all your files to the same output directory, then you can set

 

 

Destination File Copy Folder = folder on second server (where the files are written out)

 

filecopy_source_dataset = folder on first file server (location of original files)

 

 

and that's it. You can safely ignore the red arrows for the other two optional attributes.

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • November 8, 2019

So if you are copying all your files to the same output directory, then you can set

 

 

Destination File Copy Folder = folder on second server (where the files are written out)

 

filecopy_source_dataset = folder on first file server (location of original files)

 

 

and that's it. You can safely ignore the red arrows for the other two optional attributes.

If you have multiple output folders you can set

 

 

Destination File Copy Folder : NotUsed

 

filecopy_source_dataset = server 1

 

filecopy_dest_dataset = server2\\subfolder (where subfolder is different for each feature)