The mgiModifyFileSystem Tag

Tag Behavior

Use the mgiModifyFileSystem tag to create or delete files and folders.


Tag Syntax

The mgiModifyFileSystem tag has two required parameters and one optional parameter. The tag form is:

<mgiModifyFileSystem mode="Mode" itemLocation="Path" 
targetLocation="Path">

Required Parameters:

  • mode - The mode is the function that the mgiModifyFileSystem tag performs. In "createFile" mode, the file listed in the itemLocation parameter is created. In "createFolder" mode, the folder listed in the itemLocation parameter is created. In "delete" mode, the file or folder listed in the itemLocation parameter is deleted. In "move" mode, the file or folder listed in the itemLocation parameter is moved to the location listed in the targetLocation parameter. In "rename" mode, the file or folder listed in the itemLocation parameter is renamed to the name listed in the targetLocation parameter. In the "copy" mode, the file or folder listed in the itemLocation parameter is copied to the location listed in the targetLocation parameter.
  • itemLocation - The itemLocation is the relative path to the file or folder.

Optional Parameters:

  • targetLocation - The targetLocation is the relative path to the moved or renamed file or folder. The targetLocation parameter is required for the "move", "rename" and "copy" modes.


Example Usage and Output

<mgiModifyFileSystem itemLocation="content1.mgi" 
mode="createFile">

In this example, a page named "content1.mgi" is created at the same level of the file system as the page containing the mgiModifyFileSystem tag.

<mgiModifyFileSystem itemLocation="Articles" 
mode="createFolder">

In this example, a folder named "Articles" is created at the same level of the file system as the page containing the mgiModifyFileSystem tag.

<mgiModifyFileSystem itemLocation="main.htm"
targetLocation="Archive/02212001.htm" mode="move">

In this example, a file named "main.htm" is moved to the "Archive" folder and renamed to "02212001.htm".


Suggested Usage

  • Creating New Files and Folders
  • Managing files via a Web-Based Interface
  • Moving and Renaming Files


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]