catecli is a Java-based command-line tool that allows users to group and view files within a directory using various criteria. It is designed to be efficient even on directories with large numbers of files.
- Group files by:
- File extension (e.g.
.pdf,.jpg) - File type (Documents, Images, Videos, etc.)
- Parent folder
- File owner (if accessible)
- Size range (Small, Medium, Large)
- File extension (e.g.
- Supports multiple grouping modes in a single command
- Optional filtering using
--onlyto limit output to specific groups - Interactive shell to run multiple commands per session
Make sure you're in the root folder of the project. Then compile using:
javac -d out src/main/java/cli/*.java
This will place the .class files in the appropriate output directory.
From the project root, launch the CLI using:
java -cp out cli.Main
This will enter interactive mode. You'll see a prompt like:
Welcome to catecli. Type a command or 'exit' to quit. catecli>
The command structure inside the shell is as follows:
--by <mode[,mode]> --path [--only group1,group2]
extension: Groups by file extensions (.txt,.png, etc.)type: Categorizes files into types like Documents, Media, etc.folder: Groups based on the parent directoryowner: Shows files grouped by owner (OS-dependent)size: Groups files into Small (<1MB), Medium (1MB–100MB), Large (>100MB)
--by extension --path C:/Users/John/Downloads --by type,folder --path D:/Work/Projects --by size --path E:/Media --only Large --by extension --path C:/Test --only pdf,jpg
To exit the shell: exit
Results are grouped by mode and printed with file names listed underneath each group.
[extension] Group: pdf (2 files)
file1.pdf
file2.pdf
[extension] Group: txt (1 file)
notes.txt