This is a Javascript
script designed to rename all folders or files within a directory using node.js
.
Place the script in the same directory as the folders you wish to rename.
In the script, you need to modify two variables:
let currentName = // Replace currentName with the current name of the folders you want rename.
let setNewName = // Replace setNewName with the new name you want modify the folders.
- Open the script and edit the two variables as described above.
- To execute this script, you need to have Node.js installed on your computer.
- To find out if you have Node.js installed, simply open the terminal and type
node --version
ornode -v
. - With the terminal open, navigate to the directory where the script is located. Note: the script must be in the same folder as the files or folders you want to rename.
- Type in the terminal
node folder-renamer.js
.
- Automate the script to accepts users entries at the CLI
- Convert to Functional Paradigm
- Use concepts of the OOP