Skip to content

notgautham/CateCLI4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CateFLI - File Categorization CLI Tool

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.

Features

  • 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)
  • Supports multiple grouping modes in a single command
  • Optional filtering using --only to limit output to specific groups
  • Interactive shell to run multiple commands per session

Compile Instructions

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.

Run Instructions

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>

Usage

The command structure inside the shell is as follows:

--by <mode[,mode]> --path [--only group1,group2]

Modes

  • extension : Groups by file extensions (.txt, .png, etc.)
  • type : Categorizes files into types like Documents, Media, etc.
  • folder : Groups based on the parent directory
  • owner : Shows files grouped by owner (OS-dependent)
  • size : Groups files into Small (<1MB), Medium (1MB–100MB), Large (>100MB)

Examples

--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

Output Format

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages