Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rimubytes/file-organizer
A script that organizes files in a directory based on their file types.
https://github.com/rimubytes/file-organizer
bash bash-scripting
Last synced: about 2 months ago
JSON representation
A script that organizes files in a directory based on their file types.
- Host: GitHub
- URL: https://github.com/rimubytes/file-organizer
- Owner: rimubytes
- License: mit
- Created: 2024-06-10T06:09:15.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-10T07:49:32.000Z (7 months ago)
- Last Synced: 2024-09-11T17:55:42.913Z (4 months ago)
- Topics: bash, bash-scripting
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File organizer
File Organizer is a bash script that organizes files in specified directories based on their file types. It categorizes files into subdirectories such as '*Images*', '*Documents*', '*Music*' and '*Videos*', making it easier to manage and find files#### Features
- Organizes files based on their extensions
- Automatically creates subdirectories for each file type category
- Moves files into the appropriate subdirectories
- Supports multiple directory paths as input
- Logs actions taken during the organization process#### Requirements
- Bash### Usage
1. Clone or download the repository
2. Make the script executable:
```bash
chmod +x organize_files.sh
```
3. Run the script with one or more directory paths as arguments:
```bash
./organize_files.sh /path/to/directory1 /path/to/directory2
```#### File Type Categories
The script categorizes the files based on their extensions into the following predefined categories:- Images: jpg, jpeg, png, gif, bmp
- Documents: txt, pdf, doc, docx
- Spreadsheets: xls, xlsx
- Music: mp3, wav, flac
- Videos: mp4, mkv, aviYou can customize these categories and extensions by modifying the 'FILE_TYPES' associative array in the script
### Logging
The script logs its actions to a file named '*organize_files.log*' in the current directory. The log includes information about moved files and any issues encountered.