Solved

test File

Posted on 2006-07-21
1
220 Views
Last Modified: 2010-04-05
hi
how i can know a file on cd is damaged or no
0
Comment
Question by:mahdiparak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
LMuadDIb earned 500 total points
ID: 17155257
do you mean if the file is readable on the cd? Why not try to copy the file to a tmp dir
or do you want file integrity? For file integrity I think the only way is to compare the file to a checksum/hash

CRC http://www.torry.net/quicksearchd.php?String=crc&Title=Yes
HASH http://www.torry.net/quicksearchd.php?String=hash&Title=Yes

http://www.swissdelphicenter.ch/torry/showcode.php?id=268

some basic code for checksum:
calculate a simple checksum:  http://www.swissdelphicenter.ch/torry/showcode.php?id=1311
calculate the checksum of a file: http://www.swissdelphicenter.ch/torry/showcode.php?id=324

---

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question