Rename

Operation Name

Rename

Function Overview

Specifies and renames the file on FTP server.

Data Model

XML type.

Properties

For information about using 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 more details on Global Resource settings, refer to "Global Resource Properties".
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Enables to edit the global resource settings in the "Edit resource list".
 
Path Required - Specify a path.

Each column can be operated with the following button.
  • [Add]:
    Adds a column.
  • [Up]:
    Moves up the order of the selected column.
  • [Down]:
    Moves down the order of the selected column.
  • [Delete]:
    Deletes a column.
 
Path/path before renaming Required Available Enter file/directory on FTP server with the absolute path starting with "/".
  • Distinguish on upper/lower cases.
Path/path after renaming Required Available Enter file/directory after renaming on the FTP server using the absolute path starting from "/".
  • Distinguish on upper/lower cases.
Rename process setting
Item name Required/Optional Use of variables Description Remarks
Do not rename if file/directory after renaming already exists Optional Not available Select whether to deny renaming if file/directory specified in [Path/path after renaming] already exists.
  • [Checked]:(default)
    Does not rename if file/directory specified in [Path/path after renaming] already exist.
  • [Not checked]:
    Execute renaming even if file/directory specified in [Path/path after renaming].
  • In case of executing rename, while file/directory already exist, operations may vary depending on FTP server of the destination.
Create, if parent directory does not exist Optional Not available Select whether to automatically create, if parent directory specified in [Path/path after renaming] does not exist.
  • [Checked]:
    Automatically creates, if the parent directory of the file/directory specified in [Path/path after renaming] does not exist.
  • [Not checked]:(default)
    Does not automatically create, if the parent directory specified in [Path/path after renaming] does not exist.
 
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 host name of the connected FTP server.  
port Outputs port number of the connected FTP server.  
user Outputs user name used when connecting to FTP server.  
pathnames -    
pathname - Emerges accordingly to rename targeted file/directory.  
date Always outputs empty data.  
filetype Outputs file type of rename targeted file/directory.
  • File:file
  • Directory:directory
 
local Always outputs empty data.  
remote Outputs the absolute path after renaming on the FTP server of rename targeted file/directory.  
size Always outputs empty data.  
status Outputs rename condition.
  • Renamed:renamed condition on FTP server.
  • Exists:Not renamed condition. Outputs only if you check [File after renaming/do not rename if directory already exists], and the file/directory specified in [Path/path after renaming] exists on FTP server.
  • NG:Not renamed condition due to error.
 
type Always outputs empty data.  

Loading Schema on Mapper

Schema is loaded automatically.
See "Edit Schema" for any details.

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 Stores the numbers of rename targeted file/directory.
  • Default value is null.
  • Sum of "directory_count" and "file_count".
directory_count Stores the numbers of rename targeted directory.
  • Default value is null.
file_count Stores the numbers of rename targeted file.
  • Default value is null.
message_category Stores the category of message code corresponding to the occured error.
  • Default value is null.
message_code Stores its corresponding message code of occured error.
  • Default value is null.
message_level Stores the severity of the corresponding message code of the occured error.
  • Default value is null.
error_type When an error occurs, the class of error will be stored.
  • Default value is null.
  • Error is represented in the format depicted below.
    Ex:"java.io.FileNotFoundException"
  • The message may vary depending on the DataSpider Servista version.
error_message Returns the error message when error occurred.
  • Default value is null.
  • Depending on version for DataSpider Servista, stored contents may alter.
error_trace Returns trace information when error occurred.
  • Default value is null.
  • Depending on version for DataSpider Servista or executing client application, stored contents may alter.

Specification Limits

Main Exceptions

Exception name Cause Measure
ResourceNotFoundException
Resource definition cannot be found.name:[]
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition cannot be found. Name:[<Global resource name>]
Selected resource definition in [Destination] cannot be found. Confirm the global resource specified in [Destination].
RemoteFileListParseException
Failed to analyze the remote file list. The encode may not be valid.
Failed to analyze the remote file list. Confirm [Encode] set in [Destination] or FTP server setting.
MalformedRemotePathException
Path before renaming is false. Enter the path before renaming with absolute path starting from "/".
[Path before renaming] is not beginning from "/. Enter [Path before renaming] with absolute path beginning from "/.
MalformedRemotePathException
Path after renaming is false. Enter the path after renaming with absolute path starting from "/".
[Path after renaming] is not beginning from "/. Enter [Path after renaming] with absolute path beginning from "/.
FTPException Exception in case FTP server returns error. Confirm message contents.
com.enterprisedt.net.ftp.FTPException Exception in case FTP server returns error. Confirm message contents.
java.net.UnknownHostException Exception in case the specified FTP server cannot be found. Confirm FTP server setting.
java.net.ConnectException Exception in case you cannot connect to FTP server. Confirm that port number or FTP server is running.

Note