# change-file-name

> This is a tool to modify the file name or extension.

Latest version **1.0.2** (published 2022-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install change-file-name
pnpm add change-file-name
yarn add change-file-name
bun add change-file-name
```

Provides the command `rn`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-07-26 |
| First published | 2022-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 向阳 |
| Maintainers | lxqddd |
| Keywords | file, directory, rename, extension |

## Links

- npm: https://www.npmjs.com/package/change-file-name
- Repository: https://github.com/lxqddd/change-file-name
- Homepage: https://github.com/lxqddd/change-file-name#readme
- Issues: https://github.com/lxqddd/change-file-name/issues
- npm.io page: https://npm.io/package/change-file-name

## Dependencies (1)

- [cac](https://npm.io/package/cac.md) ^6.7.12

## 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

- 1.0.2 (latest) — 2022-07-26
- 1.0.1 — 2022-07-26
- 1.0.0 — 2022-07-26

## README

# change-file-name

This is a tool to modify the file name or extension.

# Installation method

- use by npm

```shell
npm install change-file-name -g
```

- use by yarn 

```shell
yarn add change-file-name -g
```

- use by pnpm 

```shell
pnpm install change-file-name -g
```

# options description

| option      | alias    | description                     |
| ----------- | ---------| ------------------------------- |
| --name      | -n       | file or directory name          |
| --extension | -e       | file's extension name           |

# How to use it.

eg1: modify a file name.

```shell
rn -n ./test.txt abc
```
`test.txt` will be renamed `abc.txt` in the current directory.

eg2: modify the extension

```shell
rn -e ./test.txt js
```
`test.txt` will be renamed `test.js` in the current directory.

eg3: modify a directory name

```shell
rn -n ./test/ abc
```

`./test/` will be renamed `./abc/` in the current directory.

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