Skip to content

Instantly share code, notes, and snippets.

@dimmduh dimmduh/gist:5002191
Last active Dec 14, 2015

Embed
What would you like to do?
pass full path to brokenFiles.txt
function delete_broken_files($data_filename){
if (file_exists( $data_filename ) ){
$data = file($data_filename);
foreach( $data as $line ){
$line_parts = explode(', CorruptJPEGChecker.exe', $line);
if (count($line_parts) > 1 && file_exists( $line_parts[0] ) ){
unlink( $line_parts[0] );
echo 'delete ' . $line_parts[0] . "\n";
}
}
}
}
@dimmduh

This comment has been minimized.

Copy link
Owner Author

dimmduh commented Nov 5, 2014

CorruptJPEGChecker.exe you can download here
http://dimmduh.com/files/CorruptJPEGChecker.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.