Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/belovetech/file_organizer
A simple Go project that organizes files in a directory based on their extension. It is primarily for improving my understanding of the Go CLI, I/O, and concurrency.
https://github.com/belovetech/file_organizer
cli cmd concurrency go goroutine
Last synced: about 2 months ago
JSON representation
A simple Go project that organizes files in a directory based on their extension. It is primarily for improving my understanding of the Go CLI, I/O, and concurrency.
- Host: GitHub
- URL: https://github.com/belovetech/file_organizer
- Owner: belovetech
- Created: 2024-07-11T09:54:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T08:23:23.000Z (6 months ago)
- Last Synced: 2024-07-12T22:40:52.823Z (6 months ago)
- Topics: cli, cmd, concurrency, go, goroutine
- Language: Go
- Homepage:
- Size: 2.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# file_organizer
File Organizer is a command-line tool that organizes files in a specified directory based on their file extensions. The program creates subdirectories named after the file extensions and moves the files into their respective subdirectories. Files without an extension are moved into a directory named no_extension.
## Features
- Organizes files by their extensions.
- Creates subdirectories named after the extensions.
- Moves files without an extension into a no_extension directory.
- Supports optional flags for verbose output and dry-run mode.## Usage
To use the File Organizer, pass the path of the directory you want to organize as an argument to the program.
```sh
./file-organizer --dir=../testDir
```## Optional Flags
`--verbose`: Enables verbose output to show detailed information about the organization process.
`--dry-run`: Performs a dry run without actually moving any files. Useful for seeing what changes will be made.
### Examples
##### Organize Files with Verbose Output
```sh
./file-organizer --dir=../testDir --verbose
```#### Perform a Dry Run
```sh
./file-organizer --dir=../testDir --dry-run
```### Installation
To build the File Organizer from source, follow these steps:
1. Clone the repository:
```sh
git clone https://github.com/yourusername/file-organizer.git
cd file-organizer
```2. Build the project:
```sh
go build -o file-organizer
```3. Run the executable with the desired flags and directory path.