APM: Perl GIF Integrity Check?
David Bluestein II
dbii at interaction.net
Wed Dec 1 01:03:24 CST 2004
Okay, weird problem. I've got a directory of a pile of thumbnails on server a, that is rsync'd to server b. Now some of the GIF files on server a are bad (same filesize, modify date, etc.) due to a disk problem and cannot be viewed. Is there a way in Perl that I can validate which files on server a are not valid GIF files? I want to delete them and restore from server b which has valid copies, but do not want to restore all the files.
I basically need:
for (@filelist) {
unless (validatefileisvalidgif ($_) {
unlink $_;
}
}
Anyone know of a quick validefileisvalidgif function/module? I'd even settle for a shell script.
David
--
David H. Bluestein II
President & Lead Developer dbii at interaction.net
ii, inc. http://www.interaction.net
-- Specializing in Designing Interactive Database Driven Websites --
More information about the Austin
mailing list