#!/usr/bin/perl -w $srcfolder = "tester/really"; #if your full-size images are in a different folder, input the folder above if (@ARGV != 2) { print "Cleans up MS Frontpage thumbnails.\n"; print "Usage: thumbnail_cleanup file_in file_out\n"; exit 0; } $file = shift; $out = shift; open (IN, "$file"); open (OUT, "> $out"); while () { s/$//g; s/xthumbnail-orig-image=".*\/(.*"\s+)/xthumbnail-orig-image="$srcfolder\/$1/g; print OUT $_; } close IN; close OUT;