Delete File Action

image\Action_File_Delete_File.jpg

The Delete File action allows you to delete a file from the system, which may be useful if you temporarily create files when a publication is running and you want to delete them when the user leaves the publication.

Setting up the Delete File action:

1. Add the Delete File action to your trigger, as described in adding actions. The Delete File tab will automatically appear when you add the action.

2. Use the Delete this file panel to enter the pathname of the file you want delete with this action.

 There are four methods of entering a pathname:

(i)  Type the pathname directly into the box.

(ii) Click on the Browse… button to open the Windows Open dialog box to browse for the file on your system – this will put the full pathname in the box for you.

(iii) Click on the Insert Variable button – this will list a number of preset variables that specify particular system locations (e.g. <SYSTEM_PUBLICATION_DIR>.

Note:
The preset variables only show the path and not the name of the file you want to delete. You must add the name of the file you want to delete to the end of the variable name, prefixed with a backslash – see preset variable example for more information.

(iv) Manually type the name of an Opus variable directly into the box – the variable must be surrounded by chevrons (e.g. <usersPathname>). The variable name you type in the box must have been created in your publication.

3. Tick the Display confirmation dialog option if you want to request confirmation before the file is deleted.

Note:
If this option is not ticked, the file will be deleted automatically without confirmation.

Related Topics:

Introducing the File Management Actions

Choosing an Action