This Python script provides a convenient way to organize files in a directory based on user-defined grouping options. It offers two main grouping options:
- grouping files by the first alphabetical letter of their filenames (-a option).
- grouping files by their file extensions (-x option).
The script allows users to specify a target directory or defaults to the current directory if none is provided. Additionally, it provides a help option (-h or --help) to display usage instructions.
Usage: clean_dir.py [OPTION] [PATH (absolute)]
Group files in the specified directory (PATH) or the current directory if no directory is provided, based on the chosen grouping OPTION.
Options:
-a Group files based on their first alphabetical letter.
-h, --help Display this help
-x Group files based on their extension.