You use deleteFile to delete a file. If you do not specify a partner then the file is deleted under the local user ID.
The name of the file that is to be deleted consists of the directory name specified with directory (see section “directory”) and the name specified with the filenames attribute.
If you want to delete all the files in a directory, you should use listDirectory (see section“listDirectory”) together with foreach (see section “foreach”).
The length of the file name (length of directory plus length of filenames) is limited and depends on the openFT version. The length is the number of characters plus 1 character if directory does not end with a "/"
You should note the response on a restart (see section “Restart”).
Format
|
Attributes
Name | Value | Meaning |
| string | Reference to a file context object. |
| | The default value is no. |
|
Example
<ftscript version="1"> <deleteFile name="hugo.trash"> <partner name="UnixP_1" systemType="unix"> <transferAdmission> <ftacAdmission ftacAdmission="FTACADM1"/> </transferAdmission> </partner> <directory name="frg_eis_05"/> </deleteFile> </ftscript>
Deletes the file hugo.trash for the FTAC transfer admission FTACADM1 in the directory frg_eis_05 on the computer UnixP_1.
Errors are not handled in this example and result in the Ftscript being deleted.