Error: AML ERROR -Argument >>and<< invalid, function EXISTS\\ line

Error Message

Attempting to start Arc, ArcEdit or ArcPlot produces the error message:

AML ERROR   - Argument  >> and <<  invalid, function EXISTS\\              line
34 of file c:\arcexe8x\startup\arc.aml
Usage: [EXISTS <object>
               {-FILE | -ADDRESS | -ANNOTATIONS{.subclass} | -ARC |
                -ASCONNECT | -ASDATABASE |
                -ASDBMSTABLE <database> <connection> |
                -ASHISTORY {datetime} {<database> <connection>} |
                -ASHistoricalVIEW {-DBMSTABLE | -INFOTABLE | -LAYER} |
                -ASINFOTABLE | -ASLAYER | -ASLIBRARY |
                -CLEAN | -COVER | -DEFLAYER | -DIRECTORY | -GRID |
                -IMAGE | -INFO | -LAYER | -LIBRARY | -LINE | -LINK |
                -NETWORK | -NODE | -POINT | -POLYGON |
                -REGION{.subclass} | -ROUTE{.subclass} | -SECTION{.subclass} |
                -STACK | -TAT{.subclass} | -TIC | -TIN | -VAT | -WORKSPACE}]
AML ERROR   - Unable to run file C:\Documentsline 35 of file c:\arcexe8x\startup\arc.aml


Machines running Windows Terminal Server, Windows 2000, or Windows XP have a variable called %HOMEPATH% that by default is set to '\Documents and Settings\<username>.'

When starting a module in ArcInfo, the AML interpreter looks for a startup aml file such as the .arc file under %HOMEDRIVE%%HOMEPATH%. The error occurs because ArcInfo cannot use paths that contain spaces. The error does not cause loss of functionality.

Solution or Workaround

There are two possible solutions to this problem.

  • Set the following variables as both System and User Variables:
HOMEPATH     C:\<create> 

Where you set these variables depends on your operating system. For help with setting a system environment variable, see: How To: Edit an environment variable.
Since other applications may need to use the '\Documents and Settings\<username>' directory, you may want to determine the '8dot3 compliant' name for this directory with the DOS command DIR /X. You can then set the %HOMEPATH% variable to this location.
  • Use Windows Notepad to edit the AML file listed in the second line of the error. In the example above it is c:\arcexe8x\startup\arc.aml.
    1. Find and fix the offending line. In the above example it is line 34:
      &if [exists %hidden% -file] &then

      Insert the QUOTE function:
      &if [exists [quote %hidden%] -file] &then

      The quotes around the file name will allow the operating system to correctly interpret the name.
    2. Save the AML and run Arc.
You will need to apply this fix to any other AML files causing the error.

Related Information