
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
CLI and Node.js API to copy files with globs, promises, typescript and stuff.
CLI and Node.js API to copy files with globs, promises, typescript and stuff.
--silent
is used)Just run kpy help
to see CLI options.
kpy <baseDir> <pattern1> <pattern2> ... <outputDir>
# Example, copy all from `test` to `out`:
kpy test out
# Example, copy all `*.txt` file from `test`, except `one.txt` to `out`:
kpy test '**/*.txt' '!**/one.txt' out
Options:
--silent
- don't output anything--verbose
- report progress on every file--dotfiles
- include files starting with .
--no-overwrite
- don't overwrite--flat
- flatten the output folders--dry
- don't copy (useful for debugging)--move
- move files instead of copyhelp
- show available optionscpy
has issue with --cwd
, --parents
. --parents
should be default, and cwd
is confusing.
cpx
is amazing, but doesn't support multiple globs and therefore negation globs (e.g
test/* !test/one.txt
)
Copy all files/dirs while keeping directory structure from test/*
to out
.
Simple, right?
cpy ** ../out --cwd test --parent
Possible, but not trivial to figure out ..out
, --cwd
, etc.
cpx out test
Works really well here!
Copy all files/dirs while keeping directory structure from test/*.txt
to out
, excluding
one.txt
.
Simple, right?
cpy ** !**/one.txt ../out --cwd test --parent
Possible, but not trivial to figure out ..out
, --cwd
, etc.
Not possible to exclude :(
This package also provides del
cli (api similar and inspired by
del.
Examples:
# Delete everything under `dist`, including `dist`:
del dist
# Delete everything under `dist`, NOT including `dist` (important to quote globs!):
del 'dist/**'
# Delete all .json files under `dist`:
del 'dist/**/*.json'
# Delete all, but .json files under `dist`:
del dist '!**/*.json'
# Delete folders `a`, `b` and `c`:
del a b c
FAQs
CLI and Node.js API to copy files with globs, promises, typescript and stuff.
The npm package kpy receives a total of 0 weekly downloads. As such, kpy popularity was classified as not popular.
We found that kpy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.