添加备注

main
roger_home_pc 1 year ago
parent 53f3f839e1
commit 0d893e7e2e
  1. 2
      db.py
  2. 7
      main.py

@ -13,7 +13,7 @@ db_cursor = db_connection.cursor(cursor=DictCursor)
def insert_data(_data):
insert_sql = "INSERT INTO files VALUES (NUAL, %s, %s, %s, %s);"
insert_sql = "INSERT INTO files VALUES (NULL, %s, %s, %s, %s);"
db_cursor.execute(insert_sql, _data)
db_connection.commit()

@ -4,9 +4,9 @@ from db import *
def main_process():
disk = ""
cate = ""
path = ""
disk = "Myxx_Backup_16T_2"
cate = "hj"
path = r"Y:\hj"
_exist_file_list = []
@ -16,6 +16,7 @@ def main_process():
file_list = get_file_list(path)
for f in file_list:
print(f"开始处理: {f}")
if md5 := get_md5_by_path(f):
print(f"请注意!!!文件的md5({md5})已经存在: {f}")
else:

Loading…
Cancel
Save