English

How To: Batch import ArcInfo interchange (.e00) files via Avenue

Summary

You can use the System.Execute Avenue request to batch process a list of ArcInfo interchange files.

Procedure

  1. Copy all interchange files to be batch processed into a single directory.
  2. Open a new script window.

    A. Activate the Project window.
    B. Click the Scripts icon.
    C. Click New.

  3. Paste the following code into the new script window.

    Code:
    '-- This script will import allow you to import multiple e00 files.
    '-- All e00 files that will be imported should be in the same directory.
    '
    '-- Set work dir to HOME and create batch file
    thehome = system.getenvvar("HOME")
    thehome.asfilename.setCWD
    thewdir = filename.getCWD
    lf = linefile.make("imp71.bat".asfilename, #FILE_PERM_WRITE)
    'Get the absolute path for the location of ArcView
    avAbsPath=system.getenvvar("AVHOME")
    '
    '-- Build the command line template
    impcmd = "\bin32\import71"
    pathtoe00file = msgbox.input(
    "Directory with *.e00 files ready for conversion to coverages",
    "Path:", "C:\e00_file\e_import")
    pathtocoverage = msgbox.input(
    "Directory where imported *.e00 files saved as coverages",
    "Path:", "C:\e00_file\e_export")
    aslash = "\"
    apathtocoverage = pathtocoverage + aslash
    e00list = pathtoe00file.asfilename.readfiles("*.e00")
    '
    '-- Execute command line string
    for each i in e00list
    xString = avabspath + impcmd ++ i.asstring ++ apathtocoverage +
    i.AsString.basictrim(pathtoe00file, ".e00")++"/T"
    lf.writeelt(xstring)
    end
    lf.close
    system.execute(thewdir.asstring+"\imp71.bat")

  4. Click the
    [O-Image] Script compile button
    button to compile the script.
  5. Click the
    [O-Image] Run compiled script button
    button to run the script.