Command reference
cde <command> [arguments] [options]
The command (also called a verb) must come first. Options come after it.
cde find afilename --template "{fullpath}"
Command names and option names are not case-sensitive. cde --help lists all commands, cde <command> --help shows the options of one command, and cde --version shows the version.
Commands
| Command | Purpose |
|---|---|
scan | Scan a folder or drive and write a catalog. |
find | Search by a piece of the file name. |
findpath | Search by a piece of the full path. |
grep | Search the file name with a regular expression. |
greppath | Search the full path with a regular expression. |
everything | Search with an Everything-style query. |
hash | Hash files so duplicates can be found. |
dupes | List duplicate files. |
migrate | Convert old .cde catalogs to .cdex. |
update | Change the description of a catalog. |
repl, replfind, replgrep, replgreppath | Interactive modes. |
treedump1 | Print the full tree of every catalog. |
Options at a glance
| Option | Applies to | Description |
|---|---|---|
--desc <text> | scan, update | Description stored in the catalog. |
--follow-junctions | scan | Go into directory junctions and symbolic links. |
--exclude <path> | scan | Skip a folder for this scan. Repeatable. |
-v, --verbose | scan | List folders that could not be read. |
--template <format> | find, findpath, grep, greppath, everything | Format of each match line. |
--filter <test> | find, findpath, grep, greppath, everything | Keep only matches that pass. Repeatable. |
Catalogs and the current directory
Every command except scan and migrate <file> works on the catalogs it finds in the current directory and one directory below it. Run cde from the folder that holds your .cdex files. See Catalog files.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | An error, such as a query that cannot be read. |
| 130 | You pressed Ctrl-C and the command was cancelled. |
See Size units for size units, and Configuration for appsettings.json.