APPEND and MAPJOIN coverages listed in a text file


AML looping syntax to enable the APPEND and MAPJOIN commands to read coverage names from a text file.


  1. Create a text file with the names of the coverages to be used by APPEND or MAPJOIN in a list format. The [LISTFILE] function may be helpful in this situation, as it has the option to write the list to an output ascii file.

    Arc: &type [listfile * -cover covlist.txt]

    This example will write the names of all coverages in the current workspace to the file COVLIST.TXT.
  2. The following code is an example of how to read the coverage names from the text file and supply them to the dialog of the APPEND or MAPJOIN command in a loop.

    &SETVAR fileunit = [OPEN covlist.txt openstat -READ]

    &SETVAR covname = [READ %fileunit% readstat]

    /* Insert the syntax for either MAPJOIN or APPEND here.
    /* For example:

    APPEND outcov polygon

    &DO &UNTIL %readstat% = 102
    [VALUE covname]
    &SETVAR covname = [READ %fileunit% readstat]
    [UNQUOTE ' ']

    &SETVAR close_stat = [CLOSE -ALL]


Article ID:000001990

  • Legacy Products
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic