Auto_sort is a project mainly written in PHP, it's free.
php script to scan a directory and sort the contents based on alphabetical order.