diff --git a/main.py b/main.py index 54adafb..1255126 100644 --- a/main.py +++ b/main.py @@ -6,23 +6,14 @@ from getMd5 import get_file_md5 from db import * from time import time as t -# sjry -# disk = "Data_sjry" -# cate = "sjry" -# path = r"F:\Temp\sjry\2023-11" +handle_data = [ + {'disk': "Data_sjry", 'cate': "sjry", 'path': r"F:\Temp\sjry\2023-11"}, + {'disk': "Data_leshe", 'cate': "leshe", 'path': r"F:\Temp\leshe\2023-12"}, + {'disk': "Data_hj", 'cate': "hj", 'path': r"F:\Temp\hj\2023-12"}, +] -# leshe -disk = "Data_leshe" -cate = "leshe" -path = r"F:\Temp\leshe\2023-12" -# # hj -# disk = "Data_hj" -# cate = "hj" -# path = r"F:\Temp\hj\2023-12" - - -def main_process(): +def main_process(disk, cate, path): _exist_file_list = [] if disk == "" or cate == "" or path == "": @@ -73,6 +64,7 @@ def handle_exist(_exist_file_list): if __name__ == "__main__": - exist_file_list = main_process() - handle_exist(exist_file_list) - remove_empty_folder(path) + for d in handle_data: + exist_file_list = main_process(d['disk'], d['cate'], d['path']) + handle_exist(exist_file_list) + remove_empty_folder(d['path'])