pad-rename
v1.1.0
Published
Rename files with pads splited on folders
Downloads
5
Maintainers
Readme
pad-rename
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
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