# FLAC file format has integrated checksum?

**URL:** <https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113>\
**Category:** Factual Questions\
**Created:** [February 17, 2012, 7:13am UTC](https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113 "2012-02-17T07:13:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grude](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@grude](https://boards.straightdope.com/u/grude)\
**Post date:** [February 17, 2012, 7:13am UTC](https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113/1 "2012-02-17T07:13:30Z")

</div>

I have seen it mentioned on several references that .FLAC format digital audio files have a “built in” checksum feature, much like .SFV which allows you to confirm that a file has not been altered or corrupted.

Is there any way to use this to batch check a bunch of FLAC files? I had a ton of CDs ripped to FLAC on an external hard drive that experienced some sector errors.  
And at least a few of the FLAC files on it were corrupted, so I’d like to batch scan them all to see which are bad.

?

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [February 17, 2012, 7:15am UTC](https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113/2 "2012-02-17T07:15:11Z")

</div>

First google link has some helpful tips: [How to validate a flac file](http://www.hydrogenaudio.org/forums/index.php?showtopic=49487)

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [February 17, 2012, 10:19am UTC](https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113/3 "2012-02-17T10:19:20Z")

</div>

[The official FLAC command-line tool](http://flac.sourceforge.net/download.html) allows you to test FLAC files. Just run the following command, substituting for the last argument the files you want to test:

```auto

flac --test *.flac

```

---

<div class="post-metadata">

**Author:** ![grude](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@grude](https://boards.straightdope.com/u/grude)\
**Post date:** [February 17, 2012, 10:23am UTC](https://boards.straightdope.com/t/flac-file-format-has-integrated-checksum/613113/4 "2012-02-17T10:23:25Z")

</div>

> [@Reply](#):
>
> First google link has some helpful tips: [http://www.hydrogenaudio.org/forums/index.php?showtopic=49487](http://www.hydrogenaudio.org/forums/index.php?showtopic=49487)

Thank you! The two links to the small executable files was exactly what I was looking for, all other solutions were either awkward(playing all the files in silent mode in foobar) or time consuming. Or was not about verifying FLAC files alone but comparing them to the source WAV files.
