I would like to find the path to specific folders that have only specific folders brothers
ex:
I want to find all folders named : zeFolder
with siblings folders brotherOne
and brotherTwo
|-dad1
|---brotherOne
|---brotherFour
|---zeFolder (not match)
|-dad2
|---brotherOne
|---brotherTwo
|---zeFolder (♥♥♥Match♥♥♥)
[...]
Below is my code, but with this solution I find all the folders.
import os
for root, dirs, files in os.walk("/"):
#print (dirs)
for name in dirs:
if name == 'totolo':
print ('finded')
print(os.path.join(root, name))
I don't know how to use Conditional Statements to do that
Thanks for you help.