Steve, Can you add something like: IF (the folder number >100) then Print LEN( dbfoldername ), dbfoldername, g_salesdatafolder Just before the call to FOLDER? Maybe that could indicate if something is wrong going into it. Also, could the path in the dbfoldername string be longer than 255 characters? russp > From: Steve Crossman <mactech@...> > Date: Sat, 7 Jan 2006 11:36:30 -0500 > Hi Russ, > > All of my loop variables are longs. It isn't a disk error, as I moved it to > another disk. > It isn't a filename or folder name. > > I FOUND the problem ---- > > db_folder = folder ( dbfoldername, g_salesdatafolder ) > > The folder function is Failing to return the correct vRef number after the 102 > folder > > the INT : db_folder is the same for every folder after the 102nd folder. > > OUCH !!!!!