find-next-file-name

1.0.1 • Public • Published

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

API

findNextFileName(directory[, ?filename[, ?continuCounting]])

Package Sidebar

Install

npm i find-next-file-name

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

5.24 kB

Total Files

8

Last publish

Collaborators

  • unnamedxaer