Last active
December 14, 2015 00:49
-
-
Save dimmduh/5002191 to your computer and use it in GitHub Desktop.
pass full path to brokenFiles.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CorruptJPEGChecker.exe you can download here
http://dimmduh.com/files/CorruptJPEGChecker.exe