优化代码

main
roger_home_pc 11 months ago
parent 54979abb85
commit c8b9b8712e
  1. 26
      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()
for d in handle_data:
exist_file_list = main_process(d['disk'], d['cate'], d['path'])
handle_exist(exist_file_list)
remove_empty_folder(path)
remove_empty_folder(d['path'])

Loading…
Cancel
Save