OdiFileCopy

Usage

OdiFileCopy -DIR=<dir> -TODIR=<dest_dir> [-OVERWRITE=<yes|no>] [-RECURSE=<yes|no>] [-CASESENS=<yes|no>]

OdiFileCopy -FILE=<file> -TOFILE=<dest_file>|-TODIR=<dest_dir> [-OVERWRITE=<yes|no>] [-RECURSE=<yes|no>] [-CASESENS=<yes|no>]

Description

Copies files or a folder into files or a folder on the machine of the execution agent.

Parameters

Parameters

Mandatory

Description

-DIR=<dir>

Yes if -FILE is omitted

Directory (or folder) to copy

-FILE=<file>

Yes if -DIR is omitted

The full path of the files to copy. Use * to specify the generic character.

Examples:

/var/tmp/*.log (All files with the "log" extension in folder /var/tmp)

arch_*.lst (All files starting with arch_ and having the "lst" extension)

-TODIR=<dest_dir>

Yes if -DIR is specified

Target directory for the copy.

If a directory is copied (-DIR), this parameter indicates the name of the copied directory.

If one or several files are copied (-FILE), this parameter indicates the destination directory.

-TOFILE=<dest_file>

Yes if -TODIR is omitted

Destination file(s). This parameter cannot be used with parameter -DIR.

This parameter contains:

  • The name of the destination file if one file only is copied (no generic character)

  • The mask of the new name of the destination files if several files are copied

Note: TODIR and TOFILE are exclusive parameters. If they are both specified, then only TODIR is taken into account, and TOFILE is ignored.

-OVERWRITE=<yes|no>

No

Indicates if the files of the folder are overwritten if they already exist. By default, the value is set to no

-RECURSE=<yes|no>

No

Indicates if the copy is done in a recursive manner in the case of a folder that contains other folders. The value no indicates that only the files within the folder must be copied, not the sub-folders.

-CASESENS=<yes|no>

No

Indicates if Oracle Data Integrator should be case sensitive when looking for the files. By default, all searched files are uppercases.

Examples

Copy the file "host" from the directory /etc to the directory /home:

OdiFileCopy -FILE=/etc/hosts -TOFILE=/home/hosts

 

Copy all *.csv files from the directory /etc to the directory /home and overwrite:

OdiFileCopy -FILE=/etc/*.csv -TODIR=/home -OVERWRITE=yes

 

Copy all *.csv files from the directory /etc to the directory /home while changing their extension to .txt:

OdiFileCopy -FILE=/etc/*.csv -TOFILE=/home/*.txt -OVERWRITE=yes

 

Copy the directory C:\odi and its sub-directories into the directory C:\Program Files\odi

OdiFileCopy -DIR=C:\odi "-TODIR=C:\Program Files\odi" -RECURSE=yes