From 0d893e7e2ee073a5e08b9149234cd7a432a0dd8d Mon Sep 17 00:00:00 2001 From: roger_home_pc Date: Mon, 16 Oct 2023 16:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.py | 2 +- main.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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: