23 lines
479 B
Python
23 lines
479 B
Python
import os
|
|
|
|
|
|
def find(path, dir):
|
|
if not os.path.isdir(path):
|
|
return
|
|
|
|
for name in os.listdir(path):
|
|
full_path = os.path.join(path, name)
|
|
|
|
if os.path.isdir(full_path):
|
|
if name == dir:
|
|
print(os.path.abspath(full_path))
|
|
|
|
find(full_path, dir)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
start_path = input("Percorso di partenza: ")
|
|
directory_name = input("Directory da cercare: ")
|
|
|
|
find(start_path, directory_name)
|