Hello, I wrote lines of code to enumerate files & folders under a given folder.

NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];

NSDirectoryEnumerator *directoryEnumerator;

NSURL *candidateURL = nil;

for( theURL in m_URLs_folders )
{
   directoryEnumerator = [fileManager enumeratorAtURL:theURL
                            includingPropertiesForKeys:enumerationKey
                                               options:enumerationMask
                                          errorHandler:nil];
        
   while( candidateURL = [directoryEnumerator nextObject] )
   {

The order [directoryEnumerator nextObject] gives is :

file://localhost/Users/jongampark/Sample%20Video/Upper/Reel/Clip_0016/Media/Clip_0016_000001.dpx,
file://localhost/Users/jongampark/Sample%20Video/Upper/Reel/Clip_0016/Media/Clip_0016_000002.dpx,
file://localhost/Users/jongampark/Sample%20Video/Upper/Reel/Clip_0016/Media/Clip_0016_000000.dpx

How can I make it retrieve in this order?

 Clip_0016_000000.dpx,
 Clip_0016_000001.dpx,
 Clip_0016_000002.dpx,

Thank you.
JongAm Park

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to