Delete File/Folder

Operation Name

Delete File/Folder

Function overview

Delete file / folder on Google Drive.

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
Destination Required Not available Select Global Resources.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be managed from "Edit Resource list".
 
Folder path Required Available Enter a Google Drive folder path.
Delete folder Optional Not available Select whether to delete the folder.
  • [Checked]:
    Deletes folder.
  • [Not Checked]: (default)
    Deletes file.
 
File/folder name Required Available Specify file/folder.
  • If [Delete folder] is checked, then it is disabled.
  • In file/folder name, wildcards ("*" and "?") are available.
Recursive processing Optional Not available For a specified folder, select whether to recursively delete the file/folder.
  • [Checked]:
    If the specified folder contains folders, then recursively delete the file/folder.
  • [Not Checked]: (default)
    Only those files found in the specified folder are retrieved.
 
Property Action
Item name Description Remarks
Refresh list of folder paths Gets folder path in the specified destination and set to [Folder path].
  • If [Destination] is specified/edited, or add/edit of folder is performed on Google Drive, the edition can be reflected using this property action.
Refresh list of item name Gets file/folder name in the specified folder path and set to [File/folder name].
  • If [Folder path] is specified/edited, or add/edit of folder is performed on Google Drive, the edition can be reflected using this property action.
  • If variable is set to [Folder path], or [Delete folder] is checked, this action will be invalid.
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"?>
<server>
  <files>
    <file name="" remotepath="" status="" type="" />
  </files>
</server>
Element name Attribute name Description Remarks
server -    
files -    
file - Appear in each deleted file/folder.
  • Lower-level files/folders in a deleted folder do not appear.
name Output the name of the deleted file/folder.
  • If status is "ErrorRemoteFolderNotFound" then the value is blank.
  • If [Delete folder] is [Checked] then the value is blank.
remotepath Output the file path on Google Drive of the deleted file/folder.  
status Output the status of the deleted file/folder.
  • Deleted: Status that the file/folder is successfully deleted.
  • ErrorRemoteFolderNotFound: The status that on Google Drive, specified [Folder path] does not exist, or file is specified.
  • ErrorRemoteFileNotFound: The status that on Google Drive, specified file / folder does not exist in specified [Folder path].
  • Error: The status that because an error occurred file / folder could not be deleted.
 
type Output the classification of deleted files/folders.
  • File: File
  • Folder: Folder
 

Loading schema in 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 Return the number which is the total number of the deleted folder and file.
  • The value defaults to null.
  • The sum of' 'folder_count' and 'file_count'.
folder_count Return the number of deleted folders.
  • The value defaults to null.
file_count Return the number of deleted files.
  • 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 occurred error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occurred error.
  • The value defaults to null.
error_type Stores the type of the occurred 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 occurred 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 Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Destination] is not specified. Please specify [Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
java.lang.UnsupportedOperationException
root folder cannot be deleted.
Attempted to delete the root folder. If the [Delete folder] is [Checked], the [Folder path] can not accept the path to the root folder.

Notes