https://github.com/hutsoninc/make-dir-range
Make directories from ranges of integers.
https://github.com/hutsoninc/make-dir-range
dir directory integer make mkdir range
Last synced: 2 months ago
JSON representation
Make directories from ranges of integers.
- Host: GitHub
- URL: https://github.com/hutsoninc/make-dir-range
- Owner: hutsoninc
- License: mit
- Created: 2018-11-06T20:01:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T11:06:42.000Z (over 6 years ago)
- Last Synced: 2025-02-08T17:35:43.007Z (11 months ago)
- Topics: dir, directory, integer, make, mkdir, range
- Language: JavaScript
- Size: 254 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# make-dir-range
[](https://travis-ci.com/hutsoninc/make-dir-range) [](https://www.npmjs.com/package/make-dir-range)
Make directories from ranges of integers.
## Installation
`npm install --save make-dir-range`
## Usage
```js
const makeDirRange = require('make-dir-range');
makeDirRange('1-3,5,9-10');
```
```
$ tree
.
├── 1
├── 2
├── 3
├── 5
├── 9
├── 10
│ ...
```
With options:
```js
const makeDirRange = require('make-dir-range');
makeDirRange('11-13,15', {
destination: 'out',
append: 'a',
prepend: 'p'
});
```
```
$ tree
.
├── out
│ ├── p11a
│ ├── p12a
│ ├── p13a
│ └── p15a
│ ...
```
## Options
Property | Description | Default
--- | --- | ---
destination | Destination directory | `""`
append | String to append to directory names | `""`
prepend | String to prepend to directory names | `""`
## Related
- [make-dir-range-cli](https://github.com/hutsoninc/make-dir-range-cli) - CLI for this module
- [copy-to-range](https://github.com/hutsoninc/copy-to-range) - Copy a file to a range of directories
- [move-to-range](https://github.com/hutsoninc/move-to-range) - Move files to corresponding directories given a range
## 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