diff --git a/File classification.py b/File classification.py index 9acb4e8..9d45f7f 100644 --- a/File classification.py +++ b/File classification.py @@ -8,7 +8,7 @@ documentfiles = officeexcle+officeppt+officeword+txt+pdf path = input("请输入路径,按回车键运行") if not path: - path=r"C:\Users\louzh\下载" + path=r"C:\Users\%username%\下载" def movefile(newpath): if not os.path.exists(f"{path}/{newpath}"): os.makedirs(f"{path}/{newpath}") @@ -53,4 +53,4 @@ def del_dir(path): #这个函数写得不好烂,应该可以优化 print("执行完成") ed = time.perf_counter() runningtime = str(int(1000*ed-st)/1000) -print(f'本程序运行时间:{runningtime}秒') \ No newline at end of file +print(f'本程序运行时间:{runningtime}秒')