2.0.1 • Published 3 years ago

renamer-index-dir v2.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

view on npm npm module downloads Gihub repo dependents Gihub package dependents Build Status Coverage Status js-standard-style

renamer-index-dir

This is a renamer replace chain plugin - see this tutorial to learn how to use renamer plugins.

Replaces the {{index}} token (like the built-in renamer behaviour) but resets the counter for each folder visited.

In the example below, Windows users should use double instead of single quotes. Remove the --dry-run flag to rename the files on disk.

$ npm install -g renamer renamer-index-dir

$ tree
.
├── folder1
│   ├── one
│   └── two
├── folder2
│   ├── one
│   └── two
├── one
└── two

2 directories, 6 files

$ renamer --chain find-replace --chain renamer-index-dir --find '/$/' --replace '{{index}}' --dry-run */*

✔︎ folder1/one → folder1/one1
✔︎ folder1/two → folder1/two2
✔︎ folder2/one → folder2/one1
✔︎ folder2/two → folder2/two2

$ tree
.
├── folder1
│   ├── one1
│   └── two2
├── folder2
│   ├── one1
│   └── two2
├── one
└── two

2 directories, 6 files

© 2018-21 Lloyd Brookes 75pound@gmail.com.

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago