I/O error 104 while parsing text file

I/O error 104 while parsing text file

Post by JavaHead Jone » Sun, 31 Dec 1899 09:00:00



I'm getting a '104' I/O error while parsing a text file. This one has me
baffled and I can't find out what a 104 error is in the first place.
Here is the source:

 SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to
input directory
    FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved
files
    AssignFile(TempFile, FindFileData.Name); // assign as text file
    Reset(TempFile); //open textfile as read only

    While NOT EOF(TempFile) Do  ----> This is where the crash occurs
after having gone                                             through once.
    Begin

Thanks a lot!

Hajo

 
 
 

I/O error 104 while parsing text file

Post by Markku Nevalaine » Sun, 31 Dec 1899 09:00:00


Is your I/O error checking turned off?   Try turning it on, if it would have any
effects.  The actual I/O error can be some lines earlier than the de*
reports it.

Markku Nevalainen


> I'm getting a '104' I/O error while parsing a text file. This one has me
> baffled and I can't find out what a 104 error is in the first place.
> Here is the source:

>  SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to
> input directory
>     FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved
> files
>     AssignFile(TempFile, FindFileData.Name); // assign as text file
>     Reset(TempFile); //open textfile as read only

>     While NOT EOF(TempFile) Do  ----> This is where the crash occurs
> after having gone                                             through once.
>     Begin

> Thanks a lot!

> Hajo


 
 
 

I/O error 104 while parsing text file

Post by Ray Crame » Sun, 31 Dec 1899 09:00:00



> I'm getting a '104' I/O error while parsing a text file. This one has me
> baffled and I can't find out what a 104 error is in the first place.

File not open for input.

Quote:> Here is the source:

>  SetCurrentDirectory(PChar('C:\Batchadd\InPut\Moved')); //switch to
> input directory
>     FindFirst(PChar('FUSM*.*'), faAnyFile, FindFileData); // find moved
> files
>     AssignFile(TempFile, FindFileData.Name); // assign as text file
>     Reset(TempFile); //open textfile as read only

>     While NOT EOF(TempFile) Do  ----> This is where the crash occurs
> after having gone                                             through once.
>     Begin

Are you closing the file inside this loop ?

Quote:

> Thanks a lot!

> Hajo

HTH
Ray Cramer

 
 
 

I/O error 104 while parsing text file

Post by JavaHead Jone » Sun, 31 Dec 1899 09:00:00



> File not open for input.

> Are you closing the file inside this loop ?

> Ray Cramer

        That fixed it thanks!

Hajo