find index of directories in subfolder