A file and directory copy tool with --exclude support. Built because PowerShell's Copy-Item doesn't have one.
scoop bucket add cpr https://github.com/canmanalp/scoop-cpr
scoop install cprcargo install --git https://github.com/canmanalp/cprGrab the latest cpr.exe from GitHub Releases and place it somewhere in your PATH.
git clone https://github.com/canmanalp/cpr
cd cpr
cargo build --release
# binary is at target/release/cpr.exe# Copy a file
cpr source.txt destination.txt
# Copy a file into a directory
cpr report.pdf ./backup/
# Copy a directory (prompts for confirmation)
cpr ./my-project ./backup/my-project
# Copy a directory, excluding patterns
cpr ./my-project ./backup/my-project --exclude node_modules,.git,*.log
# Short flag
cpr ./src ./dist -e target,*.tmpComma-separated, passed via --exclude / -e:
| Pattern | Matches |
|---|---|
node_modules |
Exact directory/file name |
.git |
Exact directory/file name |
*.log |
Any file ending in .log |
*.tmp |
Any file ending in .tmp |
MIT