move-to-range-cli

1.0.1 • Public • Published

move-to-range-cli

Current npm package version

Move files to corresponding directories given a range.

Installation

npm install --global move-to-range-cli

Usage

$ move-to-range --help

  Move files to a range of directories.

  Usage
    $ move-to-range <int>-<int> <file-type>
  Options
    --destination, -d  Destination for dirs
  Example
    $ move-to-range 1-5,7,9-10 .txt
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 5.txt
├── 1
├── 2
├── 3
├── 5
│ ...

$ move-to-range 1-3,5 .txt

# tree
.
├── 1
│   └── 1.txt
├── 2
│   └── 2.txt
├── 3
│   └── 3.txt
├── 5
│   └── 5.txt
│ ...

With options:

$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 5.txt
├── out
│   ├── 1
│   ├── 2
│   ├── 3
│   └── 5
│ ...

$ move-to-range 1-3,5 .txt --destination out

$ tree
.
├── out
│   ├── 1
│   │   └── 1.txt
│   ├── 2
│   │   └── 2.txt
│   ├── 3
│   │   └── 3.txt
│   └── 5
│       └── 5.txt
│ ...

Command Line/Shell Alias

Windows

Follow the instructions on this Stack Overflow answer to set up an alias on Windows.

UNIX

alias mdr=make-dir-range

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

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

4.9 kB

Total Files

4

Last publish

Collaborators

  • austinleegordon