File Organiser is a Go application that helps you organise files in a directory based on their extensions.
- Organises files into subdirectories based on their extensions
- Configurable via YAML file
- Logging with different log levels
- Go 1.16 or higher
Clone the repository:
git clone https://github.com/rukywe/file-organiser.git
cd file-organiser
Install dependencies:
go mod tidy
Edit the config.yaml
file to set your preferences:
source_dir: '/path/to/source/directory'
log_level: 'info'
file_extensions:
'.txt': 'documents'
'.jpg': 'images'
'.pdf': 'documents'
source_dir
: The directory to organizelog_level
: Logging level ("info" or "debug")file_extensions
: Map of file extensions to target directories
Build and run the application:
go build ./cmd/fileorganiser
./fileorganiser -config config.yaml
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.