List sample:
user/xxx/Archives/2010
user/xxx/BLARG
user/xxx/BlArG
user/xxx/Burton
user/xxx/DAY
user/yyy/Trainees/Nutrition interns
user/yyy/Trainees/Primary Care
user/yyy/Trainees/Psychiatric NP interns
user/yyy/Trainees/Psychiatric residents
user/yyy/Trainees/Psychology externs
user/yyy/Trainees/psychology eXterns
user/zzz/Goose/moose
user/zzz/Goose/mouse
user/zzz/Goose/Moose
user/zzz/Goose/Moose/goose
user/zzz/Goose/Moose/Goose
user/aaa/Boo
user/aaa/Bah/boo
user/aaa/boo/boo
user/aaa/boo/boO
user/aaa/bOo/boo
user/bbb/Zoo
user/bbb/Zoo/boo
user/bbb/ooo/boo
user/bbb/ooo/bOo
I'm helping to migrate a mail server from a case sensitive folder name space to a case insensitive one.
The case sensitive space was able to accommodate folders like "test", "TEST" and "Test" as different folders,
the new system will only allow one of these (on the same lever per user).
The current system will _not_ allow the same level of folder to have an identical name - that the output below appears to show the opposite e.g. Trainees,
means Trainees is a parent folder:
user/yyy/Trainees/Nutrition interns
user/yyy/Trainees/Primary Care
user/yyy/Trainees/Psychiatric NP interns
user/yyy/Trainees/Psychiatric residents
user/yyy/Trainees/Psychology externs
user/yyy/Trainees/psychology eXterns
given this behavior, I don't care about Trainees being the same - that it is (identical, and on the same level) indicates it's a parent folder.
but I do care about Psychology externs and psychology eXterns given their shared parent.
In this example:
user/zzz/Goose/moose
user/zzz/Goose/mouse
user/zzz/Goose/Moose
user/zzz/Goose/Moose/goose
user/zzz/Goose/Moose/Goose
I don't care about the first "/Goose/" - it's a parent with children,
but "moose" I do care about because it's in the same container ("/Goose/") as "/Moose/" - so the new system will not allow this.
Similarly, I care about "Goose/Moose/goose" and "Goose/Moose/Goose" because "goose" and "Goose" are in the same "Goose/Moose/" container,
and again this is unacceptable to the new system.
For each user, I'd like to identify the folder path levels that are identical except in case - e.g.
user/xxx/BLARG*
user/xxx/BlArG*
user/yyy/Trainees/Psychology externs*
user/yyy/Trainees/psychology eXterns*
user/zzz/Goose/moose*
user/zzz/Goose/Moose*
user/zzz/Goose/Moose/goose*
user/zzz/Goose/Moose/Goose*
user/aaa/Boo*
user/aaa/boo/boo*
user/aaa/boo/boO*
user/aaa/bOo*/boo
user/bbb/ooo/boo*
user/bbb/ooo/bOo*
Again, I don't care about folder paths that are completely identical (case included) as this will indicate it's a parent folder.
Any ideas or working pseudo code?
Thanks for any info. And I hope this was clear and I didn't miss any edge cases.
Bill