From ca5f23be6039acc8eb7227de13df475f79312b14 Mon Sep 17 00:00:00 2001 From: frankhch <106564542+frankhch@users.noreply.github.com> Date: Sat, 18 Feb 2023 21:41:12 +0800 Subject: [PATCH] Add files via upload --- Classify Files.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Classify Files.py diff --git a/Classify Files.py b/Classify Files.py new file mode 100644 index 0000000000..75d91df863 --- /dev/null +++ b/Classify Files.py @@ -0,0 +1,10 @@ +import os +import shutil +# os.makedirs('excelfiles') +root = os.getcwd() +files = os.listdir() +for file in files: + if file.endswith('.xlsx'): + if os.path.exists(f'excelfiles/{file}'): + os.remove(f'excelfiles/{file}') + shutil.move(file,'excelfiles/') \ No newline at end of file