The mgiFileDelete Tag

Tag Behavior

The mgiFileDelete tag deletes a specified file when the tag is parsed.


Tag Syntax

The mgiFileDelete tag has one required parameter and one optional parameter. The tag form is:

<mgiFileDelete fileLocation="File Path" verifyFileExistence="Yes/No">

Parameters:

  • fileLocation="File Path" where "File Path" is the relative path to the file (located at or below the current level of the file structure) that you wish to delete.

Optional Parameters:

  • verifyFileExistence="Yes/No" where "Yes" indicates that the file is verified before it is deleted. If the file exists, it is deleted. If the file does not exist, an error page is displayed. "No" indicates that the file is not verified before it is deleted. If the file exists, it is deleted. If the file does not exist, the page is processed and an error page is not displayed. The default value is "No".


Example Usage and Output

<mgiFileDelete fileLocation={mgiFieldContent name="File"}
verifyFileExistence="Yes">

In this example, an mgiFileDelete tag that resides on a form processing page deletes the file that is entered into a form field named "File". If the file does not exists, an error page is displayed.


Suggested Usage

  • Form Processing


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]