I'm trying to process TIGER data for every county in the US and have run
into a problem with the fileexists() function. My MapBasic program is
looping through each county by reading a path name from a dbf and adding a
table name (e.g. 'E:\tiger2004fe\KY\21111\mapinfo\AllData.Tab'). Everything
works fine until the loop reaches the second folder for Nevada. I know the
folder and table exist yet fileexists() returns false.

The basic code from the program is below:

************************
Open Table "E:\tiger2004fe\pathlist.TAB" Interactive

fetch first from pathlist

do while not eot(pathlist)

        workp=pathlist.path

        print workp
        print done
        print FileExists(workp+"AllData.tab")

        If not FileExists(workp+"AllData.tab") then
                goto skiprec
        End If

        open table workp+"AllData.tab"

        '*****************
        'Process data here
        '*****************

        skiprec:

        fetch next from pathlist

loop
************************

Has anyone else experienced anything similar?

BTW, I'm using MapInfo & MapBasic <gulp> 4.5 w/XP Pro.

Thank you,

Dan Phillips


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15818

Reply via email to