File Copy Feature Representation

In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).

Attribute Name

Contents

filecopy_source_dataset

The source location from which to copy files.

This is expected to be an existing file, folder, or glob dataset complete with either relative, absolute, or UNC paths. Relative paths are with respect to the workspace folder.

Note  Backslashes must be escaped. Forward slashes are also acceptable. Basic glob or wildcard patterns are supported.

Example values might include:

../sourcedir/myfile.txt

c:/temp/mydir/

\\\\mycomputer\\mydir\\

c:/mydir/*.mov

c:/mydir/myfile*.r??

This format attribute is automatically exposed.

Range: Valid path and file name or folder

filecopy_dest_filename

The new name for the output file instead of using the source file name.

This is only effective if the filecopy_source_dataset attribute contains the path to an existing file – not a folder or glob pattern.

Folder renaming when copying and moving is already implicitly supported when the destination dataset is specified.

This is expected to be a file name with an optional file extension.

If the file exists, the Overwrite Existing File parameter will be consulted to determine behavior. Example values might include:

myfile.txt

noextensionfile

This format attribute may be exposed to provide a value for renaming.

Range: Valid file name

Examples

Writer Options

File/Folder Locations

Source Folder

c:\temp\myfiles_to_copy\file1.txt

c:\temp\myfiles_to_copy\file2.txt

Workspace Folder

c\temp\filecopy.fmw

FILECOPY Writer Dataset

c:\out

Example 1

Copies

filecopy_source_dataset = myfiles_to_copy\file1.txt

c:\temp\myfiles_to_copy\file1.txt

to

c:\out\file1.txt

Example 2

Copies

filecopy_source_dataset = myfiles_to_copy

All files in

c:\temp\myfiles_to_copy

to

c:\out (including the source or subfolders if Writer Parameters Copy Source Folder or Copy Subfolders are set to Yes)

Example 3

Copies

filecopy_source_dataset = c:\temp\myfiles_to_copy\file2.txt

filecopy_dest_filename = my_new_file2.txt

c:\temp\myfiles_to_copy\file2.txt

to

c:\out\my_new_file2.txt