Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

copy-random

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-random

Copy random files

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

copy-random

NPM version Build status

Copy random files from a folder

Installation

npm install copy-random --save

Usage

var cpyr = require('copy-random');

cpyr('./test/*.png','./test/output',3).then(function(){
})

CLI

npm install copy-random -g
Usage
  $ cpyr <source>... <destination> <size>

Options
  --no-overwrite       Do not overwrite the destination
  --parents            Preserve path structure
  --cwd=<dir>          Working directory for files
  --rename=<filename>  Rename all <source> filenames to <filename>

<source> can contain globs if quoted

Examples
  Copy 3 random .png files in src folder into dist except src/goat.png
  $ cpyr "src/*.png" "!src/goat.png" dist 3

  Copy 3 random .html files inside src folder into dist and preserve path structure
  $ cpyr "**/*.html" "../dist/" 3 --cwd=src --parents

License

MIT

Keywords

FAQs

Package last updated on 01 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc