On May 22, 5:24 pm, dj <d.a.aberna... at gmail.com> wrote: ...snip... > for d in dir: > if end == d: dir is the list of subdirs of the current dir, and the current dir is NOT a subdir of itself so end == dir is never true Are you trying to get a list per subdir? cheers