For what it's worth, I've created a simple bash script to delete the folders over a certain age. This script will work with the 'Single file PHP Galery' setup. All you need to do is set the path to your uploaded images and _sfpg_data directories. I used cron to execute this script every night at midnight.
-R
#!/bin/bash
#Set deletion interval (x days ago).
daysago=`date -d "10 days ago" +%Y%m%d`
#Set directory path
dir=/home/html/webcam
#Set SFPG data directory path
sfpg=/home/html/webcam/_sfpg_data
#The Delete Script
for dirs in "$dir"/*/
do
if [[ "$dirs" != "$sfpg"/ ]]
then
cam=`basename $dirs`
cd $dirs
for backup in [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
do
if test "$backup" -lt "$daysago"
then
#echo $dirs$backup
rm -rf $dirs$backup
#echo $sfpg/info/$cam/$backup
rm -rf $sfpg/info/$cam/$backup
#echo $sfpg/thumb/$cam/$backup
rm -rf $sfpg/thumb/$cam/$backup
fi
done
fi
done