https://github.com/hutsoninc/move-to-range
Move files to corresponding directories given a range.
https://github.com/hutsoninc/move-to-range
dir directory file files integer move mv range
Last synced: 8 months ago
JSON representation
Move files to corresponding directories given a range.
- Host: GitHub
- URL: https://github.com/hutsoninc/move-to-range
- Owner: hutsoninc
- License: mit
- Created: 2018-11-08T16:19:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T11:08:26.000Z (about 7 years ago)
- Last Synced: 2025-10-28T06:36:41.086Z (8 months ago)
- Topics: dir, directory, file, files, integer, move, mv, range
- Language: JavaScript
- Homepage:
- Size: 256 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# move-to-range
[](https://travis-ci.com/hutsoninc/move-to-range) [](https://www.npmjs.com/package/move-to-range)
Move files to corresponding directories given a range
## Installation
`npm install --save move-to-range`
## Usage
```js
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:
```js
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
- [move-to-range-cli](https://github.com/hutsoninc/move-to-range-cli) - CLI for this module
- [copy-to-range](https://github.com/hutsoninc/copy-to-range) - Copy a file to a range of directories
- [make-dir-range](https://github.com/hutsoninc/make-dir-range) - Make directories from a range of integers
## Authors
* **Austin Gordon** - *Development* - [GitHub](https://github.com/AustinLeeGordon)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details