Perl: Zip=ca-2016.0227-256359.nef.7z -> ca-2016.0227-*.nef/.sts ($base=$zip) =~ s/\.7z$//; # Strip .7z suffix -> NEF name %zext=('nef' => "$base", 'sts' => "$base.sts"); # Zip Extract # Overwrite zip internal filenames with binary file contents &extract_zip('/some/dir/ca-2016.0227-256359.nef.7z', \%zext); my $new_md5=md5_hex($zext{nef}); if($zext{sts} =~ m/$new_md5) { &Success(); } else(&dispair())