Get List of File Names

Operation Name

Get List of File Names

Function overview

Gets a list of file names in a directory.

Data Model

Data model of this component is 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 on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Directory path Required Available Enter the directory path to get the list.

Click [Browse] button to activate the file Selectr and Select the directory.
Sort file name list Optional Not available Select whether to sort the list of file names.
  • [Checked]:
    Sort file names according to [Sort order].
  • [Not Checked]: (default)
    Do not sort.
 
Sort order Optional Not available Select the sort order.
  • [Ascending]: (default)
    Sort by name ascending.
  • [Descending]:
    Sort by name descending.
  • Enabled when the [Sort file name list] is checked.
  • The order of the file name is based on the Unicode order.
    For example (in ascending order): number (normal width) < letter (normal width) < Hiragana (em-size) <katakana (em-size) < Kanji < number (em-size) < letter (em-size) < Katakana (en-size).
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" encoding="UTF-8" ?>
  <filelist>
    <file name="" size="" type="" updated=""/>
  </filelist>
Element name Attribute name Description Remarks
filelist - Root element  
file name Represents the name of the file or the directory retrieved.  
size Represents the size of the file or the directory retrieved. The unit is byte.
  • Output "0" when directories are retrieved.
type Represents the type of the file or the directory retrieved.
  • [file]:File
  • [directory]:Directory
 
updated Represents last modified time of the file or the directory retrieved.
  • Output by the format of [xmlfw.daterenderingformat] inside system property.If it has not been set, the default format will be "yyyy-MM-dd'T'HH: mm: ss.SSSZZ "is printed on.
    Example :2007-10-16T13: 15:22.738 +0900
  • Time zone is the time zone of DataSpiderServer.

Loading schema in Mapper

Schema is loaded automatically.
Refer to "Edit Schema"

Mass data processing

Mass data processing is not supported.

PSP Usage

PSP is not supported.

Available Component variables

Variable name Description Remarks
success Wither success or failure of the process is stored.
  • The value defaults to null.
  • If successful the operation is true, returns false if it fails.
directoryCount Returns the number of directories acquired.
  • The value defaults to null.
fileCount Returns the number of files retrieved.
  • The value defaults to null.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
FileIsNotDirectoryException The path specified in the [Directory path] is not a directory. Check a directory for the [Directory path].
java.io.FileNotFoundException The specified directory not found. Specify a directory for [Directory path].
PathIsNotAbsoluteException The specified path is a relative path. The path only accepts an absolute path. Specify an absolute path for the [Directory path].