pad-rename

1.1.0 • Public • Published

pad-rename

NPM version Build status

Rename files with pads splited on folders

Installation

npm install pad-rename --save

Usage

rpad(glob,options,callback)

Example

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

Option Description Default
start The inital pad start. 1
length The padding length. 3
val The string used as padding. 0
sufix The string used as sufix. ""
prefix The string used as prefix. ""

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

Package Sidebar

Install

npm i pad-rename

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • webcaetano