# pad-rename

> Rename files with pads splited on folders

Latest version **1.1.0** (published 2017-04-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install pad-rename
pnpm add pad-rename
yarn add pad-rename
bun add pad-rename
```

Provides the command `rpad`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-04-11 |
| First published | 2016-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andre Caetano |
| Maintainers | webcaetano |
| Keywords | cli-app, cli, rename, mv, copy, file, files, clone, pad, fs, glob, file-system |

## Links

- npm: https://www.npmjs.com/package/pad-rename
- Repository: https://github.com/webcaetano/pad-rename
- Homepage: https://github.com/webcaetano/pad-rename#readme
- Issues: https://github.com/webcaetano/pad-rename/issues
- npm.io page: https://npm.io/package/pad-rename

## Dependencies (5)

- [glob](https://npm.io/package/glob.md) ^7.1.1
- [meow](https://npm.io/package/meow.md) ^3.7.0
- [async](https://npm.io/package/async.md) ^2.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.13.1
- [node-natural-sort](https://npm.io/package/node-natural-sort.md) ^0.8.6

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-04-11
- 1.0.3 — 2016-11-10
- 1.0.2 — 2016-10-21
- 1.0.1 — 2016-10-21
- 1.0.0 — 2016-10-21

## README

# pad-rename

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
<!-- [![Test coverage][coveralls-image]][coveralls-url] -->

> Rename files with pads splited on folders

## Installation

```
npm install pad-rename --save
```

## Usage

```
rpad(glob,options,callback)
```

## Example 

```javascript
var rpad = require('pad-rename');


rpad('**/*.png',function(){

});

// or
rpad(['**/*.png'],{start:0},function(){

});

// or
rpad(['**/*.png'],function(){

},{start:0});

// with all options
rpad(['**/*.png'],function(err,data){

},{
	prefix:'lulu_',
	sufix:'_purple',
	start:0,
	length:5,
	val:'o',
});
```

## Options


<table>
<tr>
<td><strong>Option</strong></td>
<td width="300"><strong>Description</strong></td>
<td><strong>Default</strong></td>
</tr>
<tr>
<td><code>start</code></td>
<td>The inital pad start.</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>length</code></td>
<td>The padding length.</td>
<td><code>3</code></td>
</tr>
<tr>
<td><code>val</code></td>
<td>The string used as padding.</td>
<td><code>0</code></td>
</tr>
<tr>
<td><code>sufix</code></td>
<td>The string used as sufix.</td>
<td><code>""</code></td>
</tr>
<tr>
<td><code>prefix</code></td>
<td>The string used as prefix.</td>
<td><code>""</code></td>
</tr>
</table>


## CLI

```
npm install pad-rename -g
```

```
Usage
	$ rpad <glob>

Options
	--start inital pad start. Default: 1
	--length the padding length. Default: 3
	--val string used as padding. Default: "0"
	--prefix string used as prefix. Default: ""
	--sufix string used as sufix. Default: ""

Examples
	rpad "**/*.png"
	rpad "**/*.png" --start 0 --length 5 --val "0" --prefix "img_" --sufix "_end"
```


## License

MIT

[npm-image]: https://img.shields.io/npm/v/pad-rename.svg?style=flat-square
[npm-url]: https://npmjs.org/package/pad-rename
[travis-image]: https://img.shields.io/travis/webcaetano/pad-rename.svg?style=flat-square
[travis-url]: https://travis-ci.org/webcaetano/pad-rename
<!-- [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/pad-rename.svg?style=flat 
[coveralls-url]: https://coveralls.io/r/blakeembrey/pad-rename?branch=master
-->

---
_Source: https://npm.io/package/pad-rename · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
