Automated file management with Docker-powered workflows
Solve these common file management problems:
- 🕵️ Manual file sorting/organization
- ⏳ Time-consuming repetitive tasks
- ☁️ Complex cloud sync setups
- 🚨 Missed file events/alerts
| Feature | Benefit |
|---|---|
| Real-time File Watching | Instant reaction to changes |
| YAML Rules Engine | No-code workflow configuration |
| Cross-Platform | Works anywhere Docker runs |
| Dry-Run Mode | Test rules safely |
| Regex-Based Renaming | Automatically clean up filenames (e.g. remove parentheses) |
# Clone repository
git clone https://github.com/bettjesse/FileSentry.git
cd FileSentry
# Create directory structure
Create the unified data directory and its subdirectories on your host:
mkdir -p files/{watcher,torrents,documents,sorted/{images,docs,text_backups},media/movies,archive/documents}
Create or update a rules.yaml file. For example:
rules:
- name: "Sort Images"
watch: "/app/files/watcher"
filters:
- extension: [".jpg", ".png"]
- exclude: "(\\.tmp$|~$)"
actions:
- move: "/app/files/sorted/images"
- name: "Organize PDFs"
watch: "/app/files/watcher"
filters:
- extension: [".pdf"]
actions:
- move: "/app/files/sorted/docs"
- name: "Backup Text Files"
watch: "/app/files/watcher"
filters:
- extension: [".txt"]
actions:
- move: "/app/files/sorted/text_backups"
- name: "Backup to S3"
watch: "/app/files/watcher"
filters:
- extension: [".jpg", ".png"]
actions:
- move: "/app/files/sorted/images"
- upload_to_s3: "s3://your-bucket-name/images/{{timestamp}}/{{filename}}"
- name: "Clean Torrent Names"
watch: "/app/files/torrents"
filters:
- extension: [".mkv", ".mp4"]
operator: "AND"
last_modified: "2h" # Process files that are at least 2 hours old
actions:
- regex: '\([^\)]+\)'
replace: "" # Remove parentheses and their content
- move: "/app/files/media/movies"
- name: "Archive Old PDFs"
watch: "/app/files/documents"
filters:
- extension: [".pdf"]
last_modified: "720h" # Files older than 30 days
operator: "AND"
actions:
- move: "/app/files/archive/documents"
docker-compose up --build
1) DRY_RUN=true docker-compose up --build
For Torrents: Place a file like movie (1080p).mp4 in files/torrents. After the file meets the last_modified condition, FileSentry should automatically rename it (removing the parentheses) and move it to files/media/movies.
For Other Rules: Similarly, drop test files into files/watcher or files/documents to see them moved to their respective directories.
Dry-Run Mode: To test without moving files, run:
DRY_RUN=true docker-compose up --build
