A simple Go tool to organize files in a directory by categorizing them into subfolders based on file types.
- Input: Provide a directory path as a command-line argument.
- Categorize: Files are grouped based on extensions:
- Images:
.jpg,.jpeg,.png,.gif - Videos:
.mov,.mkv,.mp4 - Documents:
.txt,.doc,.pdf - Others: Files with unrecognized extensions.
- Images:
- Folders: Subfolders are created for each category.
- Move: Files are moved into their respective folders.
- Save the code to
main.go. - Run:
go run main.go [Dir Path]