diff --git a/db.py b/db.py index e9547de..daced1e 100644 --- a/db.py +++ b/db.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() diff --git a/main.py b/main.py index 007b3a7..6b811fd 100644 --- a/main.py +++ b/main.py @@ -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: