Orang Command Line Tool
Search, replace, rename and delete files and its content using the power of .NET regular expressions.
Commands
- copy
- delete
- find
- help
- move
- regex create
- regex escape
- regex list
- regex match
- regex split
- rename
- replace
- spellcheck
- sync
Exit Code
| Code | Comment |
|---|---|
| 0 | Match found |
| 1 | No match found |
| 2 | Error occurred or execution canceled |
Redirected/Piped Input
Redirected/piped input will be used either as a raw text or as a list of paths separated with newlines.
| Command | Piped Input |
|---|---|
| copy | list of paths |
| delete | list of paths |
| find | text (default) or list of paths when --pipe p[aths] is specified |
| move | list of paths |
| regex escape | text |
| regex match | text |
| regex split | text |
| rename | list of paths |
| replace | text (default) or list of paths when --pipe p[aths] is specified |
| sync | list of paths |
Multi-value Parameters
A lot of Orang parameters can have multiple values. Only shortcoming of this approach is that a user cannot specify argument (usually path(s)) as a last value of a command if the argument is preceded with multi-value parameter.
Following command is invalid because path C:/Documents is treated as a value of multi-value parameter -c | --content.
orang find -c "^abc" i m "C:/Documents"
To fix this problem you can either add parameter --paths
orang find -c "abc" i m --paths "C:/Documents"
or you can specify path right after the command name:
orang find "C:/Documents" -c "abc" i m