1. RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 20, 2003
- 404 views
Rolf: Thanks anyway, but you misunderstood the problem. I routinely take the measures you recommend on CDs with errors. What I want to do is to have a program that checks whether the CD has errors or not. Cheers. ----- Original Message ----- From: <r.schr at t-online.de> Subject: Re: Checking file integrity > > the CD-ROM you read from might be in a bad condition, i.e., everything > is readable but the read process has to try it several times for some > items. The copy process normally affords a continuous flow of data, > which may be broken by the slow reading process. Try to copy the CD-ROM > with the slowest burning speed possible. Also an other CD-ROM drive > might be the solution. > > Have a nice day, Rolf > > > rforno at tutopia.com wrote: > > > > > > Rob: > > The attached program tries to verify file integrity. > > I ran this program on a data CDROM, which I know has errors because Nero > > stops with "read error" when trying to copy it. However, the program does > > not detect > > any error. Am I doing something wrong? > > Regards. > > > > > > TOPICA - Start your own email discussion group. FREE! > > > ------------------------------------------------------------------------ > > Name: verify.ZIP > > verify.ZIP Type: Zip Compressed Data (application/x-zip-compressed) > > Encoding: base64 > > > > TOPICA - Start your own email discussion group. FREE! > >
2. RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 22, 2003
- 388 views
a a a a Lines to cheat Topica last glitch... Rob: I just tried this approach (comparing reported file size and actual bytes read) as previously advised to me by Pete Lomax. However, although I know some file is corrupted because Nero refuses to read it (it stops with "read error" while trying to copy the CD), my program does not detect any difference between sizes, so I think some of the bytes read should be wrong. Wouldn't be it possible for Euphoria to return an error report in such a case, for example with a negative number different from -1 (EOF)? Maybe I'm wrong, but I think the OS has a variable called errno (under C) that can be accessed by the user. Couldn't it be used to that end? Regards. ----- Original Message ----- From: Robert Craig <rds at RapidEuphoria.com> To: EUforum <EUforum at topica.com> Sent: Monday, April 21, 2003 2:36 AM Subject: Re: Checking file integrity > > The attached program tries to verify file integrity. > > I ran this program on a data CDROM, which I know has errors because Nero > > stops with "read error" when trying to copy it. However, the program does > > not detect > > any error. Am I doing something wrong? > > > I don't know what you expected to happen. > Your program seems to just read each file > until it encounters a -1 (end of file). > If a file has been corrupted, maybe you will > get a -1 prematurely. Euphoria itself will never > report an error. Maybe you should count the number of > bytes and compare with the size in the dir() entry. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > > TOPICA - Start your own email discussion group. FREE! > >
3. RE: Checking file integrity
- Posted by mistertrik at hotmail.com Apr 22, 2003
- 402 views
excess line excess line How about reading both files in to your program, and doing a checksum on them? It would be slow, but if you read the file in as you went, then perhaps that could be faster. ===================================================== .______<-------------------\__ / _____<--------------------__|=== ||_ <-------------------/ \__| Mr Trick >From: rforno at tutopia.com >Reply-To: EUforum at topica.com >To: EUforum <EUforum at topica.com> >Subject: RE: Checking file integrity >Date: Mon, 21 Apr 2003 14:10:03 -0300 > >a >a >a >a >Lines to cheat Topica last glitch... >Rob: >I just tried this approach (comparing reported file size and actual bytes >read) as previously advised to me by Pete Lomax. >However, although I know some file is corrupted because Nero refuses to >read >it (it stops with "read error" while trying to copy the CD), my program >does >not detect any difference between sizes, so I think some of the bytes read >should be wrong. >Wouldn't be it possible for Euphoria to return an error report in such a >case, for example with a negative number different from -1 (EOF)? >Maybe I'm wrong, but I think the OS has a variable called errno (under C) >that can be accessed by the user. Couldn't it be used to that end? >Regards. > >----- Original Message ----- >From: Robert Craig <rds at RapidEuphoria.com> >To: EUforum <EUforum at topica.com> >Sent: Monday, April 21, 2003 2:36 AM >Subject: Re: Checking file integrity > > > > > The attached program tries to verify file integrity. > > > I ran this program on a data CDROM, which I know has errors because >Nero > > > stops with "read error" when trying to copy it. However, the program >does > > > not detect > > > any error. Am I doing something wrong? > > > > > > I don't know what you expected to happen. > > Your program seems to just read each file > > until it encounters a -1 (end of file). > > If a file has been corrupted, maybe you will > > get a -1 prematurely. Euphoria itself will never > > report an error. Maybe you should count the number of > > bytes and compare with the size in the dir() entry. > > > > Regards, > > Rob Craig > > Rapid Deployment Software > > http://www.RapidEuphoria.com > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > >TOPICA - Start your own email discussion group. FREE! > >
4. RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 23, 2003
- 419 views
----- Original Message ----- From: Robert Craig <rds at RapidEuphoria.com> Subject: Re: Checking file integrity > x > x > rforno at tutopia.com wrote: > > Wouldn't be it possible for Euphoria to return an error report in such a > > case, for example with a negative number different from -1 (EOF)? > > Maybe I'm wrong, but I think the OS has a variable called errno (under C) > > that can be accessed by the user. Couldn't it be used to that end? > > I'm not aware of any test that I could make that would > detect an error on the disk media. Even if there were > such a test, would it be worth wasting a couple of machine > cycles on *every* byte read by *every* program? > Of course I didn't think of checking every byte. I think the disk driver maybe checks parity, or CRC. > I believe that each disk sector has a checksum on it. > Perhaps your "Nero" program sees if the checksum is correct. > I also think so. Would it be possible for Euphoria to access this information? > I would have thought that the O/S would complain loudly > if a sector were bad (i.e. bad checksum). > So did I (this was what I expected from the first version of my program, as you pointed out), but apparently this didn't happen. I am going to perform some experiments on this subject. Regards. > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > > TOPICA - Start your own email discussion group. FREE! > >
5. RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 23, 2003
- 439 views
excess... excess... Which two files?? I have only one! ----- Original Message ----- From: <mistertrik at hotmail.com> Subject: RE: Checking file integrity > excess line > excess line > > How about reading both files in to your program, and doing a checksum on > them? It would be slow, but if you read the file in as you went, then > perhaps that could be faster. > ===================================================== > .______<-------------------\__ > / _____<--------------------__|=== > ||_ <-------------------/ > \__| Mr Trick > > > >From: rforno at tutopia.com > >Reply-To: EUforum at topica.com > >To: EUforum <EUforum at topica.com> > >Subject: RE: Checking file integrity > >Date: Mon, 21 Apr 2003 14:10:03 -0300 > > > >a > >a > >a > >a > >Lines to cheat Topica last glitch... > >Rob: > >I just tried this approach (comparing reported file size and actual bytes > >read) as previously advised to me by Pete Lomax. > >However, although I know some file is corrupted because Nero refuses to > >read > >it (it stops with "read error" while trying to copy the CD), my program > >does > >not detect any difference between sizes, so I think some of the bytes read > >should be wrong. > >Wouldn't be it possible for Euphoria to return an error report in such a > >case, for example with a negative number different from -1 (EOF)? > >Maybe I'm wrong, but I think the OS has a variable called errno (under C) > >that can be accessed by the user. Couldn't it be used to that end? > >Regards. > > > >----- Original Message ----- > >From: Robert Craig <rds at RapidEuphoria.com> > >To: EUforum <EUforum at topica.com> > >Sent: Monday, April 21, 2003 2:36 AM > >Subject: Re: Checking file integrity > > > > > > > > The attached program tries to verify file integrity. > > > > I ran this program on a data CDROM, which I know has errors because > >Nero > > > > stops with "read error" when trying to copy it. However, the program > >does > > > > not detect > > > > any error. Am I doing something wrong? > > > > > > > > > I don't know what you expected to happen. > > > Your program seems to just read each file > > > until it encounters a -1 (end of file). > > > If a file has been corrupted, maybe you will > > > get a -1 prematurely. Euphoria itself will never > > > report an error. Maybe you should count the number of > > > bytes and compare with the size in the dir() entry. > > > > > > Regards, > > > Rob Craig > > > Rapid Deployment Software > > > http://www.RapidEuphoria.com > > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > >TOPICA - Start your own email discussion group. FREE! > > > > > > > TOPICA - Start your own email discussion group. FREE! > >
6. RE: Checking file integrity
- Posted by rforno at tutopia.com Apr 26, 2003
- 410 views
Guillermo: As a matter of fact, I had tons of bad diskettes, but I formatted them and now they are OK, with less capacity. The ones that resisted formatting went= to the garbage can. Well, I don't need to *write* to the device, but to *read* from it. Anyway,= I know it is not that hard, but I wanted to do it in pure Euphoria, if at all possible. Rob has made clear it isn't. Regards. =BFAlguna vez ven=EDs por Buenos Aires? Avisame. ----- Original Message ----- From: <pampeano at rocketmail.com> To: EUforum <EUforum at topica.com> Sent: Friday, April 25, 2003 12:01 PM Subject: Re: Checking file integrity > > empty lines, just in case > empty lines, just in case > empty lines, just in case > empty lines, just in case > > Hi Ricardo, > I think you'll have to access direct writing to the device, I don't > know how to do it with Win32 API's but i do with BIOS int's. It's not > that hard. > Btw, if you want some broken floppies just come to Santa Rosa, La > Pampa where I live, i've tons of them here. =3D) > > Best Regards, > Guillermo Bonvehi > > --- rforno at tutopia.com wrote: > > > > Pete: > > The CD I was speaking of is not protected, as far as I know. Once > > upon a > > time it was completely readable, but later on it developed a scratch. > > As a > > matter of fact, I have good copies of it. > > My aim was to develop a program that detects unreadable files in a > > medium, > > like hard disks, CD-ROMs, diskettes or whatever. Believe it or not, > > at this > > very moment I have no bad diskettes at hand, so I can't test it. But > > I hope > > to have one soon... > > Regards. > > > > TOPICA - Start your own email discussion group. FREE! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >