file-rename
v1.0.2
Published
Batch modification of file names for specified folders
Downloads
19
Readme
file-rename
Batch modification of file names for specified folders
start
npm i file-rename
Use
const rename = require("./index");
// before
//
// ├── rename
// │ └── a
// │ ├── b
// │ └── b1.js
// │ └── a1.js
rename("./rename", ".js", ".jsx");
// after
//
// ├── rename
// │ └── a
// │ ├── b
// │ └── b1.jsx
// │ └── a1.jsx
option
- folder
- default:
./rename
- type:
string
- describe: Catalogues to be processed.
- default:
- match = ".js"
- default:
.js
- type:
string|RegExp
- describe: Documents to be processed, Regular or string matching.
- default:
- newName = ".ts"
- default:
.ts
- type:
string|function
- describe: Names processed, Just like
fileName.replace(match,newName)
.
- default: