Author: Mainship | Posted on: 10/20/2008 4:04:20 PM | Views : 266

I have a large number of image files that are named in groups.  If one image in the group is named 12345, the others will be named 12345-2, 12345-3, 12345-4 etc.  Unfortunately, the person maintaining the files will sometimes drop an image, and not rename the others in the group, so I can have a 12345, a 12345-3, but not a 12345-2.  There is also no way to know how many files there are in a group.  Most have only one file, some have two, a few have more, and a few have none.
I need to know how many files I have in the group I'm working with, and if possible their files names.  Is there any way to programmatically look for all files where the first 5 characters is "12345" for or all files named "12345*" ?  Or at least to get a count of how many files start with 12345?  I need to display them, and where that are more than 9, implement paging which is really hard to do if I don't know how many files I have to work wit ...

Go to the complete details ...