Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

deleteFile

&pagelevel(3)&pagelevel

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

 <deleteFile ref?="ID" faultIfNotExists?="yes|no" filenames >
   comment?
   context?
   partner?
   directory?
 </deleteFile>

Attributes

Name

Value

Meaning

ref?

string

Reference to a file context object.

faultIfNotExists?

yes | no

The default value is no.
If the file does not exist then this is not considered to be
an error and Ftscript processing is continued.
If yes is specified then the Ftscript request is aborted with
ft_notExists if the file does not exist. On a restart (see
section “Restart”), the Ftscript request is
aborted with ft_recoveryFailed. This may also occur if the
instance is switched.

filenames

See section “File name attributes”.

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.