Generate slideshow of images present in a folder
You could try something along the lines of the following:

function mymodule_get_folder_images() {
$directory = "path/to/your/images";
//Check this...my regex is crap
$mask = "(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF)";    
$options = array(
'recursive' =&gt; TRUE
);

//This should return an array of images
$images = file_scan_directory($directory, $mask, $options);

//Loop through the array once to get an array of paths.
foreach ($images as $k =&gt; $v) {
$imagearray[] = $v-&gt;uri;
}

//This should probably be passed to a theme function to be more Drupally.

$output = '&lt;div id="slideshow"&gt;';

foreach ($imagearray as $k =&gt; $imagepath) {
if ($k == '0') {
$output .= '&lt;img class="first" src=". $imagepath." /&gt;';
} 
else {
$output .= '&lt;img src=". $imagepath." /&gt;';
}

$output .= '&lt;/div&gt;';

return $output;
}


This will give you an unordered list of images that you can use to create your slideshow.  Then just hook the jQuery Cycle plugin (or any other slideshow plugin) into your site and you're off.  I can't really help with the slideshow integration as it's going to be pretty custom for your needs, but it becomes much easier when you already have the image urls formatted nicely.  Obviously, if you need a list instead then you just re-format the last foreach loop.