Yes, the paths are absolute. The example 'E:\tiger2004fe\KY\21111\mapinfo\' is straight from the dbf. The only thing that changes between records is the state abbreviation & state\county code.
Thanks, Dan -----Original Message----- From: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED] Sent: Monday, March 28, 2005 12:20 PM To: Dan Phillips; MapInfo-L Cc: Bill Thoen Subject: RE: MI-L Problem with Fileexists() (I think) And workp is the absolute path (C:\...\) to the document, not just the relative path (...\) ?? Peter Horsb�ll M�ller GIS Developer Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -----Original Message----- From: Dan Phillips [mailto:[EMAIL PROTECTED] Sent: Monday, March 28, 2005 7:18 PM To: MapInfo-L Cc: Bill Thoen; Peter Horsb�ll M�ller Subject: RE: MI-L Problem with Fileexists() (I think) Thanks Bill & Peter, However, all of the entries in the dbf end with a backslash. This makes no sense. If I open the table manually in MapInfo, close it, then use fileexits() in the MapBasic window, it returns TRUE. If I restart the program, the data for the folder I just tested will process correctly but the next will not. Dan -----Original Message----- From: Bill Thoen [mailto:[EMAIL PROTECTED] Sent: Monday, March 28, 2005 11:37 AM To: Dan Phillips Subject: Re: MI-L Problem with Fileexists() (I think) Are you sure you terminate your paths with a backslash? If workp doesn't end in a '\' then workp+"AllData.tab" isn't going to exist. On Mon, 28 Mar 2005, Dan Phillips wrote: > 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 > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 15822
