This commit is contained in:
2024-08-15 10:39:03 +02:00
parent c996fea78d
commit e61a9c1540

View File

@@ -1,12 +1,12 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os, sys import os, sys
def show_all_files_directory(dir_path = str, search_endung = False, search_string = False): def show_all_files_directory(dir_path = str, search_endung = False, search_string = False, exclude_folder = "glob"):
li_all = [] li_all = []
for (root_folder, dirs, files) in os.walk(dir_path, topdown=False): for (root_folder, dirs, files) in os.walk(dir_path, topdown=False):
for name in files: for name in files:
FullPATH = [str(os.path.join(root_folder, name)), name] FullPATH = [str(os.path.join(root_folder, name)), name]
print(FullPATH)
if not search_endung is False: if not search_endung is False:
if FullPATH.endswith(search_endung): if FullPATH.endswith(search_endung):
li_all.append(FullPATH) li_all.append(FullPATH)
@@ -27,7 +27,8 @@ def main(check_list = list, main_folder_in = str):
for file_name in run_file_check: for file_name in run_file_check:
if file_name == "frm_ref": if file_name == "frm_ref":
filename = "frmref" filename = "frmref"
output_list.append(str(folder_name + '=' +file_name[1])) if file_name != "glob":
output_list.append(str(folder_name + '=' +file_name[1]))
output_list.append("") output_list.append("")
else: else:
print(main_folder, "existiert nicht") print(main_folder, "existiert nicht")