We have a program running with Foxpro 2.6 for DOS that is doing something that we can't explain and I was wondering if anybody else had seen anything similar. We are currently running it on a Windows 7 PC.
The program creates a text file from a directory listing, then creates a table with a single 12 character field. It then checks to see if the text file exists and if it does, it appends the contents of the text file into the table. When it is finished appending, we delete the file. However, once or maybe twice a day, we are getting the "File does not exist. Cancel Suspend Ignore" error message on the append command. We JUST created both the text file and the table, so how could the file no longer exist at this point? We thought perhaps another program was deleting it (we were originally using tmp.txt) so we changed the filename to card.txt, and then card.fil when it continued.
! dir &vdrv.\mailbox\*.dbf > &vdrv.\mailbox\card.fil
sele sele(1)
create table &vwpath.infile (line c(12))
if file(vdrv+"\mailbox\card.fil")
[highlight #EF2929] appe from &vdrv.\mailbox\card.fil sdf for upper(line)="CARD" and ;
upper(right(line,3))="DBF" and val(substr(line,5,4))>0[/highlight]
if file(vdrv+"\mailbox\card.fil")
dele file &vdrv.\mailbox\card.fil
endif
endif
The program creates a text file from a directory listing, then creates a table with a single 12 character field. It then checks to see if the text file exists and if it does, it appends the contents of the text file into the table. When it is finished appending, we delete the file. However, once or maybe twice a day, we are getting the "File does not exist. Cancel Suspend Ignore" error message on the append command. We JUST created both the text file and the table, so how could the file no longer exist at this point? We thought perhaps another program was deleting it (we were originally using tmp.txt) so we changed the filename to card.txt, and then card.fil when it continued.
! dir &vdrv.\mailbox\*.dbf > &vdrv.\mailbox\card.fil
sele sele(1)
create table &vwpath.infile (line c(12))
if file(vdrv+"\mailbox\card.fil")
[highlight #EF2929] appe from &vdrv.\mailbox\card.fil sdf for upper(line)="CARD" and ;
upper(right(line,3))="DBF" and val(substr(line,5,4))>0[/highlight]
if file(vdrv+"\mailbox\card.fil")
dele file &vdrv.\mailbox\card.fil
endif
endif