Using scripts to send inserter control files and receive results files

RICOH ProcessDirector provides scripts that you can use to send inserter control files to the inserter controller, and to receive inserter results files from the inserter controller.
    Note:
  • You can use your own script instead of one of the scripts that RICOH ProcessDirector provides. However, the script that you use must accept the same parameters as the RICOH ProcessDirector scripts. For information about all the parameters that the scripts accept, see the prologs of the scripts in directory /aiw/aiw1/bin.

When you create an inserter controller object, you specify the script and its parameters in these properties:

  • Control File tab: Send command
  • Second Control File tab: Send command
  • Results File tab: Receive command
  • Results File tab: Polling command
You can specify different scripts in each property.

Scripts to transfer inserter files in /aiw/aiw1/bin lists the supplied scripts in directory /aiw/aiw1/bin.

Scripts to transfer inserter files in /aiw/aiw1/bin

Script Description

copy_file.sh (AIX or Linux)

copy_file.pl (Windows)

Copies the inserter control file from the RICOH ProcessDirector spool directory to another directory on the same computer.

Copies the inserter results file or files from a directory on the primary computer to a staging directory.

move_file.sh (AIX or Linux)

move_file.pl (Windows)

Moves the inserter control file from the RICOH ProcessDirector spool directory to another directory on the same computer.

Moves the inserter results file or files from a directory on the primary computer to a staging directory.

ftp_file.sh (supported on AIX or Linux only)

Uses the File Transfer Protocol (FTP) to send the inserter control file from the RICOH ProcessDirector spool directory to a directory on a separate computer.

Uses the File Transfer Protocol (FTP) to receive the inserter results file (or files) from a directory on a separate computer and store the file in a staging directory on the primary computer.

    Note:
  • To use this script, the FTP command must be installed. To check if the command is installed, enter which ftp on the UNIX or Linux command line.

scp_file.sh (supported on AIX or Linux only)

Uses the Secure Copy Protocol (SCP) to send the inserter control file from the RICOH ProcessDirector spool directory to a directory on a separate computer.

Uses the Secure Copy Protocol (SCP) to receive the inserter results file (or files) from a directory on a separate computer and store the file in a staging directory on the primary computer.

    Note:
  • To use this script, the Secure Shell and SCP commands must be installed. To check if the commands are installed, enter which ssh and which scp on the UNIX or Linux command line.

sftp_file.sh (supported on AIX or Linux only)

Uses the Secure File Transfer Protocol (SFTP) to send the inserter control file from the RICOH ProcessDirector spool directory to a directory on a separate computer.

Uses the Secure File Transfer Protocol (SFTP) to receive the inserter results file (or files) from a directory on a separate computer and store the file in a staging directory on the primary computer.

    Note:
  • To use this script, the Secure Shell and SFTP commands must be installed. To check if the commands are installed, enter which ssh and which sftp on the UNIX or Linux command line.

Parameters to send inserter control files to the inserter controller lists the parameters that you can specify on the supplied scripts to send inserter control files from RICOH ProcessDirector to the inserter controller. Brackets indicate optional parameters.

Parameters to send inserter control files to the inserter controller

Script Parameters to send inserter control files to the inserter controller (Send command)

copy_file.sh (AIX or Linux)

copy_file.pl (Windows)

-d destination_directory/filename 
[-p file_permissions]
[-v]

ftp_file.sh (supported on AIX or Linux only)

-d destination_directory/filename 
-h host
[-p file_permissions]
-u user_id 
[-v]
-w password 
-x put

scp_file.sh (supported on AIX or Linux only)

-d destination_directory/filename 
-h host
[-p file_permissions]
-u user_id 
[-v]
-x put

sftp_file.sh (supported on AIX or Linux only)

-d destination_directory/filename 
-h host
[-p file_permissions]
-u user_id 
[-v]
-x put
    Note:
  • Do not specify any parameters in addition to the ones shown in this table. For example, do not specify the -s parameter to identify the source directory and filename.
-d destination_directory/filename
Specifies the destination directory and file name of the inserter control file. In the file name, you can use a RICOH ProcessDirector symbol to include the value of a RICOH ProcessDirector property in the file name. For example, the ${Job.Inserter.JobID} symbol obtains the value of the Inserter job name property.
-h host
Specifies the host name of the separate computer.
-u user_id
Specifies the login name on the separate computer.
-v
Specifies the verbose mode to help troubleshoot problems. This parameter is optional.
-w password
Specifies the login password on the separate computer.
-p file_permissions
Specifies the permissions, in octal format, to set (using the UNIX chmod command) on the inserter control file in the destination directory. This parameter is optional. If it is omitted, the script does not set any permissions.
-x put
Indicates that the inserter control file is to be sent from RICOH ProcessDirector to another system.

Parameters to receive inserter results files to RICOH ProcessDirector lists the parameters that you can specify on the supplied scripts to receive inserter results files from the inserter controller to RICOH ProcessDirector. Brackets indicate optional parameters.

Parameters to receive inserter results files to RICOH ProcessDirector

Script Parameters to receive inserter results files (Receive command) Parameters to receive all inserter results files in a directory (Polling command)

copy_file.sh (AIX or Linux)

copy_file.pl (Windows)

-s source_directory/filename -s source_directory/*

ftp_file.sh (supported on AIX or Linux only)

-h host
-s source_directory/filename
-u user_id
[-v]
-w password
-x get 
-h host
-s source_directory/*
-u user_id
[-v]
-w password
-x get 

scp_file.sh (supported on AIX or Linux only)

-h host
-s source_directory/filename
-u user_id
[-v]
-x get 
-h host
-s source_directory/*
-u user_id
[-v]
-x get 

sftp_file.sh (supported on AIX or Linux only)

-h host
-s source_directory/filename
-u user_id
[-v]
-x get 
-h host
-s source_directory/*
-u user_id
[-v]
-x get 
    Note:
  • Do not specify any parameters in addition to the ones shown in this table. For example, do not specify the -d parameter to identify the destination directory.
-h host
Specifies the host name of the separate computer.
-u user_id
Specifies the login name on the separate computer.
-v
Specifies the verbose mode to help troubleshoot problems. This parameter is optional.
-w password
Specifies the login password on the separate computer.
-s source_directory/filename
Specifies the source directory and file name of the inserter results file. The file name can use a RICOH ProcessDirector symbol to include the value of a RICOH ProcessDirector property in the file name. For example, the ${Job.Inserter.JobID} symbol obtains the value of the Inserter job name property.
-s source_directory/*
Specifies the source directory that contains the inserter results files. The asterisk (*) in the file name specifies all files in the directory. Enclose the entire parameter value in quotation marks.
-x get
Indicates that RICOH ProcessDirector is to receive the inserter results file or files from another computer.

Examples

These examples show the scripts that you can specify in the Send command property of the inserter controller to send the inserter control file for a job from RICOH ProcessDirector to the inserter controller.

copy_file.sh -d /inserter/input/${Job.Inserter.JobID}.icf -p 644ftp_file.sh -x put -h sys1 -u user1 -w pass1 -d /inserter/input/${Job.Inserter.JobID}.icf -p 644scp_file.sh -x put -h sys1 -u user1 -w pass1 -d /inserter/input/${Job.Inserter.JobID}.icf -p 644sftp_file.sh -x put -h sys1 -u user1 -d /inserter/input/${Job.Inserter.JobID}.icf -p 644

These examples show commands that you can specify in the Receive command property of the inserter controller to receive the inserter results file for a job from the inserter controller to RICOH ProcessDirector:

copy_file.sh -s /inserter/output/${Job.Inserter.JobID}.icfftp_file.sh -x get -h sys1 -u user1 -w pass1 -s /inserter/output/${Job.Inserter.JobID}.icfscp_file.sh -x get -h sys1 -u user1 -w pass1 -s /inserter/output/${Job.Inserter.JobID}.icfsftp_file.sh -x get -h sys1 -u user1 -s /inserter/output/${Job.Inserter.JobID}.icf

These examples show commands that you can specify in the Polling command property of the inserter controller to receive all the inserter results file in a directory from the inserter controller to RICOH ProcessDirector:

copy_file.sh -s "/inserter/output/*.icf"ftp_file.sh -x get -h sys1 -u user1 -w pass1 -s "/inserter/output/*.icf"scp_file.sh -x get -h sys1 -u user1 -w pass1 -s "/inserter/output/*.icf"sftp_file.sh -x get -h sys1 -u user1 -s "/inserter/output/*.icf"