We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b08688 commit 1801d92Copy full SHA for 1801d92
file_handler/file_processor.py
@@ -23,8 +23,12 @@ def process_files(self):
23
return
24
25
files = [f for f in os.listdir(self.config.SOURCE_FOLDER) if os.path.isfile(os.path.join(self.config.SOURCE_FOLDER, f))]
26
- for filename in files:
27
- filepath = os.path.join(self.config.SOURCE_FOLDER, filename)
28
- self.file_organizer.organize_file(filepath)
+
+ for root, _, files in os.walk(self.config.SOURCE_FOLDER):
+ for filename in files:
29
+ filepath = os.path.join(root, filename)
30
+ self.file_organizer.organize_file(filepath)
31
32
+ logger.info("File processing completed successfully.")
33
except Exception as e:
34
logger.error(f"Error processing files: {e}")
0 commit comments