Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oaphi/rrename
Simple recursive file renamer
https://github.com/oaphi/rrename
Last synced: 26 days ago
JSON representation
Simple recursive file renamer
- Host: GitHub
- URL: https://github.com/oaphi/rrename
- Owner: Oaphi
- Created: 2021-02-05T04:07:51.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-07T22:27:22.000Z (almost 4 years ago)
- Last Synced: 2024-11-07T09:50:13.556Z (3 months ago)
- Language: TypeScript
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Renamer
Quick utility script to recursively rename all files matching a pattern.
# Usage
Initial version is launched directly from TypeScript source and thus has `typescript` and `ts-node` bundled in (subject to change).
Currently the module is run as a CLI program, there is no exposed API for use in scripts.
```shell
$ ts-node index.ts \
"" \
"" \
"[RegExp string for files to include]" \
"[RegExp string for files to omit]"
```The following example renames all `.tsx` files starting from the current working directory into `.ts` except when the file is starting with `index`:
```shell
$ ts-node index.ts . "\$1.ts" "(.*)\\.tsx" "index*"
```