For renaming multiple files and/or sub-folders at once in a folder
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You need:
- NodeJS and NPM to install the dependencies for this project (recommended NodeJS version 8 or higher)
A step by step series of examples that tell you how to get a development env running
Clone the repo.
git clone https://github.com/eclipticrick/batch-file-renamer.git batch-file-renamer
Install the dependencies in the newly created folder
cd batch-file-renamer
npm install
(Optionally) Configure the defaults or add custom actions in config.js
module.exports = {
default: {
path: 'C:\\Temp',
renameFolders: false,
renameFiles: true
},
actions: {
replace: {
fn: oldName => (replaceString, withString) => {
const re = new RegExp(replaceString, 'g');
return oldName.replace(re, withString);
},
args: ['string to replace', 'replacement string']
},
reverse: {
fn: oldName => () => oldName.split('').reverse().join(''),
args: []
},
toUpperCase: {
fn: oldName => () => oldName.toUpperCase(),
args: []
},
append: {
fn: oldName => string => oldName + string,
args: ['string to append']
}
}
};
Run the program to rename files & folders
npm run start
- Wesley Veenendaal - Initial work - Github page
See also the list of contributors who participated in this project.