Skip to content

CanManalp/cpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpr

A file and directory copy tool with --exclude support. Built because PowerShell's Copy-Item doesn't have one.

Installation

Scoop (Windows)

scoop bucket add cpr https://github.com/canmanalp/scoop-cpr
scoop install cpr

Cargo

cargo install --git https://github.com/canmanalp/cpr

Download binary

Grab the latest cpr.exe from GitHub Releases and place it somewhere in your PATH.

Build from source

git clone https://github.com/canmanalp/cpr
cd cpr
cargo build --release
# binary is at target/release/cpr.exe

Usage

# 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,*.tmp

Exclude patterns

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

License

MIT

About

A fast file and directory copy tool with exclude pattern support

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages