So:

        NSFileManager *fileMgr = [NSFileManager defaultManager];
        
        NSArray *contents = [fileMgr contentsOfDirectoryAtPath:<path> 
error:nil];
        for (NSString *item in contents)
        {
            if ([item rangeOfString:<wildcard>].location !=NSNotFound)
            {
                [fileMgr removeItemAtPath:item error:NULL];
            }
        }

Please note that I haven't tested this - I've just pulled it out of my, erm, 
head.  This is just the approach that I'd take.  Change <path> and <wildcard> 
as appropriate.

On 26 Nov 2013, at 16:42, koko <k...@highrolls.net> wrote:

> 
> On Nov 26, 2013, at 8:56 AM, Pax <45rpmli...@googlemail.com> wrote:
> 
>> hy would you delete files in this manner?
> 
> Need to wildcard the file names.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to