filename-to-dir
Use filenames to create folders schema.
Installation
npm install filename-to-dir --save
Usage
namedir(glob,dest,options,callback)
Example
var namedir = ; ; // this// heroes_$_lulu_$_hit_$_001.png// heroes_$_lulu_$_hit_$_002.png// heroes_$_janna_$_walk_$_001.png // return// destFolder/heroes/lulu/hit/001.png// destFolder/heroes/lulu/hit/002.png// destFolder/heroes/janna/walk/001.png // or; // with all options;
Options
Option | Description | Default |
split |
Split string. | _$_ |
CLI
npm install filename-to-dir -g
Usage
$ namedir <glob> <dest>
Options
--split Split string. Default: "_$_"
Examples
namedir "**/*.png"
namedir "**/*.png" destFolder/
namedir "**/*.png" "destFolder/" --split "@"
Check Also
License
MIT