move-to-range

1.0.2 • Public • Published

move-to-range

Build Status Current npm package version

Move files to corresponding directories given a range

Installation

npm install --save move-to-range

Usage

const moveToRange = require('move-to-range');
 
moveToRange('1-4', '.txt');
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 4.txt
├── 1
│   └── 1.txt
├── 2
│   └── 2.txt
├── 3
│   └── 3.txt
├── 4
│   └── 4.txt
│ ...

With options:

const moveToRange = require('move-to-range');
 
moveToRange('1-4', '.txt', {
    destination: 'out'
});
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 4.txt
├── out
│   ├── 1
│   │   └── 1.txt
│   ├── 2
│   │   └── 2.txt
│   ├── 3
│   │   └── 3.txt
│   └── 4
│       └── 4.txt
│ ...

Options

Property Description Default
destination Destination directory ""

Related

Authors

  • Austin Gordon - Development - GitHub

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i move-to-range

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

6.44 kB

Total Files

6

Last publish

Collaborators

  • austinleegordon