How to programmatically check for corrupted .mov and delete it

I recovered many thousands of .mov video files on my mac from a corrupted time machine backup using EaseUS recovery wizard. However, many of the files are corrupted. If you try to open them Quicktime will say it cannot open the document. How can I write a program to check many thousands of these files and delete the corrupted ones? I haven't been able to set up an account for chatgpt to ask it to do it :)


iMac 27″, macOS 11.7

Posted on Mar 30, 2023 4:04 PM

Reply

Similar questions

4 replies

Mar 31, 2023 4:44 AM in response to erickdobrasil

They may not be recoverable as regular playable movies as that recovery software may not have recovered all of the parts of the movie or organized them in a manner that QuickTime determines as playable. It gives you the illusion it has recovered something but probably does not guarantee the accuracy of that recovery.


Have you attempted to play these corrupted .mov files in the free VLC media player?


There are no programmatical means to determine if a movie is corrupt or not. If it doesn't play, it is corrupt.

Mar 31, 2023 9:19 AM in response to dialabrain

Thanks for your responses. The fact remains that some video files were playable in their entirety (by Quicktime). I just want to weed out the ones that Quicktime says are NOT playable as I mentioned. Would it be possible to run Automator or another tool to see if Quicktime displays the error message shown below and, if yes, then delete the file and go onto the next file? Note that other .mov videos were played by Quicktime.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to programmatically check for corrupted .mov and delete it

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.