over the names and use the UDF to pad the string with zeros, add it to
an array, and then sort the array. maybe a stretch, but theoretically it
should work. I recently took the PadStringToLen function from
www.cflib.org written by Stephen Rittler , and modified it to pad to the
left instead of the right.
<cfscript>
function PadStringToLenLeft(string, char, count)
{
var strLen = len(string);
var padLen = count - strLen;
if (padLen lte 0) {
return string;
}
else {
return RepeatString(char, padLen) & string;
}
}
</cfscript>
<cfset newFilename = PadStringToLenLeft(filename,"0",3)> or whatever
Dan
Jeff Garza wrote:
> Name your files so that the order will be correct. Remember, the OS
> sees a string not a number so it's ordering as a string would be ordered.
>
> 001.tif
> 002.tif
> ...
> 010.tif
> 011.tif
> ...
> 100.tif
> 101.tif
> ...
> etc...
>
> Jeff Garza
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

