The CFDIRECTORY/CFLOOP/CFFILE solution is what I've used as well, at least where I needed to keep it all CF. If you don't mind shelling out, you can use native OS commands (rm or del), which do accept wildcards. It'll be a lot faster if you've got more than a couple files to kill off, even with the process creation overhead.
cheers, barneyb On 11/18/05, Dawson, Michael <[EMAIL PROTECTED]> wrote: > Is there a way to easily delete files with wildcards? > > I want to delete some files that begin with something like "20051118_". > The rest of the filename contains randomly-generated character such as > "20051118_34425623.jpg". > > CFFILE does not accept wildcards. > > My next attempt will be CFDIRECTORY to get a list of files in the > directory. Then, I will loop over those files until I find the ones I > want. Then, I will perform a CFFILE on that value. > > This solution kind of sucks because I have to loop over a list that > could contain thousands of files. > > Any other suggestions? > > Thanks > M!ke > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224678 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54