#!/usr/bin/perl # # update # # dseelig - circa 2004 # script runs through the photo directory and calls 5max. it could be # used to do other things on a per-directory basis. # # we're expecting the following organization of photos: # # $photo_dir/[album_names]/*.jpg # # we'll go through each directory in album_names, then # take the images we find there and put them into three # categories: # # thumbs - directory with thumbnails # 5max - directory with medium-sized images # orig - directory with the original images $photo_dir = "/mnt/raid/backups/seeligd/photos"; $runme = "/mnt/raid/seeligd/bin/5max"; opendir(PD, $photo_dir) or die "Can't open $photo_dir: $!"; print "updating directories in $photo_dir:\n"; while( defined ($dir = readdir PD) ) { next if $dir =~ /^\.\.?$/; # skip . and .. #print "$photo_dir/$dir\n"; chdir("$photo_dir/$dir"); #system("pwd"); $answer = system($runme); } closedir(PD);