1.0.1 • Published 5 years ago
find-next-file-name v1.0.1
find-next-file-name
Add number in parentheses to file name if in specified location a file with given name already exists.
Usage
const findNextFileName = require('find-next-file-name');
console.log(findNextFileName(
"C:/reports/",
"lastmonth.pdf"
));
Return example:
$ lastmonth (1).pdf
Installation
$ npm install find-next-file-name