Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

10.2.4 fcopycli File Transfer Command

Synopsis

fcopycli HostName /s:SourceName [/su:SourceUserName]
       /d:DestName [/du:DestUserName]
       [/lg:LoginGroup] [/a | /b] [/rc:nn /ri:nnnn]

Description

The fcopycli command enables file transfer by clients. This command allows the transfer of files on client to server or files on server to client. It performs file transfers using the Windows shared directories (Windows network share method) or file transfers through FTP services (FTP method).

If you wish only to perform file transfer, you can transfer files even to the destination server without having Systemwalker Operation Manager installed.

Parameters

HostName

Specifies a host name of the client which is requested to transfer a file. Specify the host name in HostName within 15 alphanumeric characters.

If HostName contains a space character, enclose it in double quotation marks.

/s:SourceName

Specify a path name of the transfer source file, including the file name. You can use a wildcard for the file name.

Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose SourceName with either single or double quotation marks as necessary.

Use one of the following methods to specify SourceName in the URL format. The parts of path name must be no longer than 255 characters. If the path name contains a space character, enclose it in double quotation marks.

A local drive path:

Specify a path including a drive name.

Specify the path name of desired file directly after "file://" string.

Example:

file://c:\database\database.db

UNC method (Windows network share method):

Specify a path in the format of "\\computer name\share name". For "computer name", specify a Windows-based computer name within 15 alphanumeric characters. Specify a share name within 80 bytes.

Specify the path name of desired file directly after "file://" character string.

Example:

file://\\foo\share\database\database.db

A path on the FTP server (FTP method):

Specify a path name to the FTP server.

The path name can be specified with the full path name or the relative path name from the current directory in logging in with FTP. Specify the path name in the format of "server name/path name of desired file" directly after "ftp://" string.

Example) To specify using the full path name:

ftp://foo.bar.com//usr/database/database.db

Example) To specify using the relative path name:

ftp://foo.bar.com/database/database.db

/su:SourceUserName

Specifies a user name to be used to access the file specified in SourceName.

And the user name to be specified to SourceUserName must be set in the password management book in advance. SourceUserName must be specified using up to 20 alphanumeric characters. If SourceUserName contains a space character, enclose it in double quotation marks.

If SourceName is specified using a local drive path or the UNC method, this parameter's specification is ignored. In this case, you need to access the target file by using the account name of user logged on to the client running the Client Task Link service.

However, if SourceName is specified using a path on the FTP server, be sure to specify this parameter.

/d:DestName

Specify a path name of the transfer destination file, including the file name. You can use a wildcard for the file name.

Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose DestName with either single or double quotation marks as necessary.

For DestName, specify the path name of the file in the URL format. You can use the same specification methods as those described in the above "/s:SourceName" parameter. See the "/s:SourceName" parameter.

If the file name that already exists is specified, it will be overwritten. Note that the same file path name as the one (SourceName) specified with /s should not be specified.

/du:DestUserName

Specifies a user name to be used to access the file specified in DestName.

The user name specified in DestUserName must be set in the password management book in advance. DestUserName must be specified using up to 20 alphanumeric characters. If DestUserName contains a space character, enclose it in double quotation marks.

If DestName is specified using a local drive path or the UNC method, this parameter's specification is ignored. In this case, you need to access the target file by using the account name of user logged in to the client running the Client Task Link service.

If DestName is specified using a path on the FPT server is specified, be sure to specify this parameter.

/lg:LoginGroup

Specifies a login definition name used to manage the password management book. Specify the login definition name in LoginGroup within 256 characters, and enclose it in double quotation marks if a space character is contained.

If the /su or /du parameter is specified, be sure to specify this parameter.

/a

Transfers a file in the ASCII text mode. This parameter is valid only when you transfer files on the FTP server (FTP method).

/b

Transfers a file in the binary mode. This parameter is valid only when you transfer files on the FTP server (FTP method).

If neither /a nor /b is specified, the file is transferred in the binary mode.

/rc:nn

Specifies the retry count in case an error occurs in file transfer.

Specify an integer value between 0 and 99 for nn. Setting any other value results in an error. If omitted, retry is not performed.

If a wildcard is used to specify the transfer source file and transfer destination file, retry is performed only for the failed file.

/ri:nnnn

Specifies the retry interval in case an error occurs. This parameter is valid if 1 or a greater value is specified to nn in the /rc parameter.

Specify an integer value between 0 and 9999 (in seconds) for nnnn. Setting any other value results in an error. The default value is 0.

Return Values

Return value

Meaning

0

Completed

value other than 0

Abended

Command Location

Solaris

/opt/FJSVsnjss/bin

HP-UX

/opt/FHPsnjss/bin

AIX

/opt/FAIXsnjss/bin

Linux

/opt/FJSVsnjss/bin

Example

In this example, the command is executed to transfer the local file "c:\database\master\database.db" on the client "foo" to the local file "d:\database\database.db". If the transfer failed, retry is performed up to three times at an interval of 60 seconds.

fcopycli foo /s:file://c:\\database\\master\\database.db
          /d:file://d:\\database\\database.db /rc:3 /ri:60

Execution Results/Output Format

After the command has been through processing, the information at command completion is output to the standard output.

The contents to be output are shown below:

[Process start time] MM-DD-YYYY HH:MM:SS
[Client host name] HostName
[Server host/User name] Server host name/user name (*)
[Retry count] Number of retries performed (*)
[Error] Error message (*)
[File transfer] Transfer source file name Transfer destination file name (**)
[Retry count] Number of retries performed (**)
[Error] Error message (**)
[Process end time] MM-DD-YYYY HH:MM:SS
*:

This information is output if the /su or /du parameter is specified.

**:

If a wild card is specified, the information of each file is output by file basis.

In [Error], "None" is output if the command completed successfully. A message is output if the command is canceled or failed. For details on the messages, see the Systemwalker Operation Manager Message Guide.

If an error occurs before transferring a file, a message is output in the following format:

[Process start time] MM-DD-YYYY HH:MM:SS
[Command error] Error message
[Process end time] MM-DD-YYYY HH:MM:SS

For details on the messages, see the Systemwalker Operation Manager Message Guide.

Cautions