sort directory indexes