# pattern-renamer

> A file renaming program which uses patterns to find the new name

Latest version **0.0.4** (published 2015-10-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install pattern-renamer
pnpm add pattern-renamer
yarn add pattern-renamer
bun add pattern-renamer
```

Provides the command `pattern-renamer`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2015-10-31 |
| First published | 2015-10-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tharindu Hasthika |
| Maintainers | tharindu96 |
| Keywords | file, renamer, pattern, regular expression, regex |

## Links

- npm: https://www.npmjs.com/package/pattern-renamer
- Repository: https://github.com/tharindu96/pattern-renamer
- Issues: https://github.com/tharindu96/pattern-renamer/issues
- npm.io page: https://npm.io/package/pattern-renamer

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [cli-argumentor](https://npm.io/package/cli-argumentor.md) 0.0.6

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2015-10-31
- 0.0.3 — 2015-10-31
- 0.0.2 — 2015-10-31
- 0.0.1 — 2015-10-31

## README

#pattern-renamer

##A file renaming program which uses patterns to find the new name

- ##Usage:
	```
	pattern-renamer [folder] -p [pattern] -o [output]
	```

- ##Options:
	```
	-p or --pattern [pattern] #The pattern which is used to find the numbers
	-o or --output [output] #The output pattern of the new file
	-c or --copy #Instead of renaming copy the files
	```

- ##Pattern variable:
	   pattern variables are used in the -p and -o options, they are fundamentally regular expression abstractions. These can be combined with regular strings and other patterns to create complex patterns   
	   basically the syntax of the patterns are as follows,   
	1. [:identifier:type:length]
	2. [:identifier:type:min:max]

	+ The above pattern keywords are described below
	  * **identifier** (optional): This is the name which, is used in the -o parameter to give the output pattern. If the pattern has a identifier
	  * **type** (required): This is the type of the regex to be matched. The types allowed are, "str", "any", "num"
	  * **length** (optional): This is exact size of the string matched
	  * **min** (optional): This is the min size of the string matched
	  * **max** (optional): This is the max size of the string matched

- ##Examples
	```
	pattern-renamer ./ -p [:any]S[:s:num:2]E[:e:num:2][:any] -o S[:s]E[:e] #This will match a file like "showS02E20.mp4" to "S02E20.mp4"
	```

---
_Source: https://npm.io/package/pattern-renamer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
