The DeleteFile component deletes a file or directory.
| Input | Format | All |
|---|---|---|
| Number of Inputs | 1 | |
| Description | Accepts all stream types. | |
| Output | Format | All |
| Description |
The input stream is copied to the output stream. |
| Name | Data Type | Mapping | Description |
|---|---|---|---|
| Path | remoteFile | In & Out |
The path of the file or folder to be copied. On UNIX systems, a pathname is absolute if its prefix is "/". On Microsoft Windows systems, a pathname is absolute if its prefix is a drive specifier followed by "\\", or if its prefix is "\\". If the file path is not an absolute file path, the path is relative to the HomeDirectory. There are two wild card characters that can be used: "*" and "?". The "*" character is an optional multi-character wild card operator. The "?" character is an optional single-character wild card operator. If the Path property specifies a single folder, all files in the folder are deleted. |
| FilePathDetail | group | - | Properties for specifying details of file path. |
| HomeDirectory | pathResolver | - |
Specifies the base folder when the path is written by a relative path.
|
| AllowAbsolute | boolean | - | Specifies whether to allow an absolute path. |
| AllowUpDir | boolean | - | Specifies whether to allow the ".." in order to move to parent folder. |
| Commit | Do nothing |
|---|---|
| Rollback | Do nothing |
| Type | Parameter | Stream for error handling flow | Error Code | Description |
|---|---|---|---|---|
| FileNotFoundException | None | This component's input stream | 2 | The Path specified directory or file cannot be found. |
| CannotDeleteException | None | This component's input stream | 3 | Failure deleting the Path specified directory or file. |
| Exception | None | This component's input stream | - | Cannot determine the relative path because the HomeDirectory property is set to Executing user home folder but the execute user does not exist. |
| 10 | Other IOExceptions. |
The file has to be closed when this component delete it. If the flow is transactional and FilePut component's AppendMode is "Append", the created file is closed after transaction is committed. Thus, the file cannot be deleted in the same flow. For details, please refer to the topic "When the written file is closed" in the FilePut component help.