Rename

Operation Name

Rename

Function Overview

Rename the specified files on FTP server.

Data Model

XML type.

Properties

For details on use of variables, refer to “Variables”.
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
For details about how to configure global resource, refer to “Global Resource Properties”.
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
 
Path Required - Specify paths.

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the selected column upwards by one row.
  • [Down]:
    Move the selected column downwards by one row.
  • [Delete]:
    Delete the column.
 
Path/Before renaming Required Available Enter the file/directory in the FTP server with an absolute path starting with “/”.
  • Case-sensitive.
Path/After renaming Required Available Enter the file/directory in the FTP server after renaming with an absolute path that starts with “/”.
  • Case-sensitive.
Rename settings
Item name Required/Optional Use of variables Description Remarks
Do not rename when file/directory after renaming already exists Optional Not available Select whether or not to rename when the file/directory specified in [Path/After renaming] already exists.
  • [Checked]: (default)
    When the file/directory specified in [Path/After renaming] already exists, it will not be renamed.
  • [Not checked]:
    Even when the file/directory specified in [Path/After renaming] already exists, it will be renamed.
  • The behavior when renaming with the file/directory already existing depends on the destination FTP server.
Create when parent directory doesn't exist Optional Not available Select whether or not to create a directory automatically when the parent directory of the file/directory specified in [Path/After renaming] does not exist.
  • [Checked]:
    When the parent directory of the file/directory specified in [Path/After renaming] does not exist, it will be created automatically.
  • [Not checked]:
    When the parent directory of the file/directory specified in [Path/After renaming] does not exist, it will not be created automatically.
 
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

None.

Output schema

<?xml version="1.0"?>
<ftpserver name="" port="" user="">
  <pathnames>
    <pathname date="" filetype="" local="" remote="" size="" status="" type=""/>
  </pathnames>
</ftpserver>
Element name Attribute name Description Remarks
ftpserver -    
name Outputs the host name of the connected FTP server.  
port Outputs the port number of the connected FTP server.  
user Outputs the user name used when connecting to FTP server.  
pathnames -    
pathname - Appears for each file/directory to be renamed.  
date Always outputs empty data.  
filetype Outputs the file type.
  • File: File
  • Directory: Directory
 
local Always outputs empty data.  
remote Outputs the absolute path (after renaming) in the FTP server of the file/directory.  
size Always outputs empty data.  
status Outputs the rename status.
  • Renamed: Status where the files is renamed in FTP server.
  • Exists: Status where the file is not renamed. When [Do not rename when file/directory after renaming already exists] is checked and the file/directory specified in [Path/After renaming] exists in the FTP server, it is output.
  • NG: Status where the file is not renamed due to an error.
 
type Always outputs empty data.  

Loading schema in Mapper

Schema is loaded automatically.
For more details, refer to “Edit Schema”.

Mass Data Processing

Mass data processing is not supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count The number of files/directories to be renamed is stored.
  • Default value is null.
  • The sum of “directory_count” and “file_count”.
directory_count The number of the directories to be renamed is stored.
  • Default value is null.
file_count The number of the files to be renamed is stored.
  • Default value is null.
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

Major Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name: [<global resource name>]
The resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
RemoteFileListParseException
Failed to parse the remote file list. The encoding may be incorrect.
Failed to parse the remote file list. Check the settings of [Encoding] selected in [Destination] and the settings of FTP server.
MalformedRemotePathException
The path before renaming is invalid. Enter the path before renaming with an absolute path starting with “/”.
[Before renaming] does not start with “/”. Enter [Before renaming] with an absolute path starting with “/”.
MalformedRemotePathException
The path after renaming is invalid. Enter the path after renaming with an absolute path starting with “/”.
[After renaming] does not start with “/”. Enter [After renaming] with an absolute path starting with “/”.
FTPException This is an exception raised when FTP server returns some error. Check the contents of the message.
com.enterprisedt.net.ftp.FTPException This is an exception raised when FTP server returns some error. Check the contents of the message.
java.net.UnknownHostException This is an exception raised when the specified FTP server is not found. Check the FTP server settings.
java.net.ConnectException This is an exception raised when unable to connect to FTP server. Check whether the port number is correct and the FTP server is running.

Notes