All Projects → sindresorhus → Cpy Cli

sindresorhus / Cpy Cli

Licence: mit
Copy files

Programming Languages

javascript
184084 projects - #8 most used programming language

cpy-cli

Copy files

Why

  • Fast by using streams.
  • Resilient by using graceful-fs.
  • User-friendly by accepting globs and creating non-existant destination directories.
  • User-friendly error messages.

Install

$ npm install --global cpy-cli

Usage

$ cpy --help

  Usage
    $ cpy <source …> <destination>

  Options
    --no-overwrite       Don't overwrite the destination
    --parents            Preserve path structure
    --cwd=<dir>          Working directory for files
    --rename=<filename>  Rename all <source> filenames to <filename>
    --dot                Allow patterns to match entries that begin with a period (.)

  <source> can contain globs if quoted

  Examples
    Copy all .png files in src folder into dist except src/goat.png
    $ cpy 'src/*.png' '!src/goat.png' dist

    Copy all .html files inside src folder into dist and preserve path structure
    $ cpy '**/*.html' '../dist/' --cwd=src --parents

Related

  • cpy - API for this module
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].