1.0.2 • Published 2 years ago
change-file-name v1.0.2
change-file-name
This is a tool to modify the file name or extension.
Installation method
- use by npm
npm install change-file-name -g
- use by yarn
yarn add change-file-name -g
- use by pnpm
pnpm install change-file-name -g
options description
option | alias | description |
---|---|---|
--name | -n | file or directory name |
--extension | -e | file's extension name |
How to use it.
eg1: modify a file name.
rn -n ./test.txt abc
test.txt
will be renamed abc.txt
in the current directory.
eg2: modify the extension
rn -e ./test.txt js
test.txt
will be renamed test.js
in the current directory.
eg3: modify a directory name
rn -n ./test/ abc
./test/
will be renamed ./abc/
in the current directory.