You are browsing as a guest. Sign up (or log in) to start making projects!

Sentinel File Organizer

  • 4 Devlogs
  • 4 Total hours

Sentinel File Organizer is a Python desktop application that watches specified folders in real time, automatically sorts files into categorized folders based on user-defined rules, maintains a persistent undo history, and will eventually display a live GUI dashboard built with PyQt6. It demonstrates event-driven programming, file I/O, data persistence, and clean two-phase architecture.

Open comments for this post

36m 25s logged

#Sentinel File Organizer Devlog #4

Today I added more rules(after I realized it only sorts .pdf) , before it was only sorting pdf files before and now it is sorting much more.

Now it is sorting:

-Documents: .pdf, .docx, .doc, .txt
-Images: .png, .jpg, .jpeg, .gif, .tiff, .svg
-Archives: .zip, .tar, .gz, .deb, .rar
-Videos: .mp4, .avi, .mov, .wmv, .flv
-Audios: .mp3, .wav, .flac, .aac


There was 2 bugs I had today:

file_type in the config was a single string so in wouldn’t work properly, and .lower was missing its parentheses so it was never actually being called.


I was planing to work on the GUI today but I did not, I will do that tomorrow.

#Sentinel File Organizer Devlog #4

Today I added more rules(after I realized it only sorts .pdf) , before it was only sorting pdf files before and now it is sorting much more.

Now it is sorting:

-Documents: .pdf, .docx, .doc, .txt
-Images: .png, .jpg, .jpeg, .gif, .tiff, .svg
-Archives: .zip, .tar, .gz, .deb, .rar
-Videos: .mp4, .avi, .mov, .wmv, .flv
-Audios: .mp3, .wav, .flac, .aac


There was 2 bugs I had today:

file_type in the config was a single string so in wouldn’t work properly, and .lower was missing its parentheses so it was never actually being called.


I was planing to work on the GUI today but I did not, I will do that tomorrow.

Replying to @Justin-F

0
1
Open comments for this post

54m 54s logged

Phase 1 of Sentinel is done. The entire backend logic is built and working. (Right Now it only sorts .pdf, sorting other types of files is part of phase 2)


Built a file scanner using pathlib. Path that reads a folder and prints each file’s name, extension, and size. Then extended it to move files based on their extension using shutil.move().


Added a JSON config system that loads and saves rules persistently between sessions. Each rule stores a name, file type, and destination folder.
Integrated watchdog to watch a folder in real time. When a new file appears, the rules engine checks its extension, finds a matching rule, creates the destination folder if needed, and moves the file automatically.


Finally built an undo system. Every automated move gets logged to config.json with the source and destination. Calling undo_last() reverses the most recent move and removes it from history.


Phase 2 starts now, replacing the terminal output with a PyQt6 desktop GUI and adding more rules to sort more types of files.

Phase 1 of Sentinel is done. The entire backend logic is built and working. (Right Now it only sorts .pdf, sorting other types of files is part of phase 2)


Built a file scanner using pathlib. Path that reads a folder and prints each file’s name, extension, and size. Then extended it to move files based on their extension using shutil.move().


Added a JSON config system that loads and saves rules persistently between sessions. Each rule stores a name, file type, and destination folder.
Integrated watchdog to watch a folder in real time. When a new file appears, the rules engine checks its extension, finds a matching rule, creates the destination folder if needed, and moves the file automatically.


Finally built an undo system. Every automated move gets logged to config.json with the source and destination. Calling undo_last() reverses the most recent move and removes it from history.


Phase 2 starts now, replacing the terminal output with a PyQt6 desktop GUI and adding more rules to sort more types of files.

Replying to @Justin-F

0
1
Open comments for this post

1h 56m 37s logged

I had a bug for the past few days that did not let me log hours. Here’s what I did:

part 1 - I created code that scans folders using pathlib.path and printed each files name that got moved.

Part 2 - Takes a hardcoded source file and destination folder, creates the destination if it doesn’t exist using .mkdir(parents = True, exist_ok = True), and moves the file using shutil.move()

Part 3 - Loads rules from config.json using json.load() prints them and has an add_rule() function that function that appends a new rule dict and saves the updated list back using json.dump()

Part 4 - A live file watcher using watchdog. Creates a Sentinel Handler class that inherits from FileSystemEventHandler and overrides on_created to print the path of any new file. Uses an Observer to watch the Downloads folder in the background. Keeps the program alive using an while True loop and stops the program using KeyboardInterrupt

Part 5 - Extends Part 4 with a rules engine. When a file is created on_created loads rules from config.json, checks if file’s extensions matches any rules file_type, creates the destination folder if needed and moves the file automatically using shutil.move()

Part 6 - Still in progress. Extends Part 5 with an undo history.

I had a bug for the past few days that did not let me log hours. Here’s what I did:

part 1 - I created code that scans folders using pathlib.path and printed each files name that got moved.

Part 2 - Takes a hardcoded source file and destination folder, creates the destination if it doesn’t exist using .mkdir(parents = True, exist_ok = True), and moves the file using shutil.move()

Part 3 - Loads rules from config.json using json.load() prints them and has an add_rule() function that function that appends a new rule dict and saves the updated list back using json.dump()

Part 4 - A live file watcher using watchdog. Creates a Sentinel Handler class that inherits from FileSystemEventHandler and overrides on_created to print the path of any new file. Uses an Observer to watch the Downloads folder in the background. Keeps the program alive using an while True loop and stops the program using KeyboardInterrupt

Part 5 - Extends Part 4 with a rules engine. When a file is created on_created loads rules from config.json, checks if file’s extensions matches any rules file_type, creates the destination folder if needed and moves the file automatically using shutil.move()

Part 6 - Still in progress. Extends Part 5 with an undo history.

Replying to @Justin-F

0
1

Followers

Loading…