>>93
今日詳細にテストしました。今使っているコードです
p_dir = pathlib.Path(dir)
p_files = []
p_err_files = []
p_glob = p_dir.glob("**/*")
while True:
____try:
________p = next(p_glob)
________dot_chk = False
________for divided_path in str(p).replace("/", "\\").split("\\"):
____________if divided_path[-1] == ".":
________________dot_chk = True
________________break
________if not dot_chk:
____________p_files.append(p)
________else:
____________p_err_files.append(p)
____except FileNotFoundError as e:
________print(e, file=sys.stderr)
____except StopIteration:
________break
____for i in p_err_files:
________for j in p_err_files:
____________if str(i).startswith(str(j)):
________________if len(str(i)) > len(str(j)):
____________________p_err_files.remove(i)
print(*p_files, sep="\n")
print(*p_err_files, sep="\n")