Skip to content
This repository has been archived by the owner on Apr 10, 2022. It is now read-only.
/ renamer Public archive

Renamer is a batch file renaming tool that allows you to rename lots of files quickly and conveniently.

License

Notifications You must be signed in to change notification settings

gergoerdosi/renamer

Repository files navigation

Renamer

Build Status

Renamer is a batch file renaming tool that allows you to rename lots of files quickly and conveniently.

Usage

The tool provides two commands, rename and validate.

Rename command

renamer:rename <config>

Arguments:

  • config: The location of the config file.

See Configuration for more details.

Validate command

renamer:validate <config>

Configuration

Options:

  • root: The directory to use as the root for the patterns.
  • renamers: Array of renamer configurations.
    • pattern: The glob pattern that specifies the paths to be renamed.
    • actions: Array of actions to be applied to paths.
      • name: The name of the action. See Actions for available names.
      • options: Options array for the action.
  • validators: Array of validator configuration. pattern:

Example:

---
root: "/Downloads"
renamers:
- pattern: "/Images/*.jpg"
  actions:
  - name: DropName
  - name: AddDirectoryName
  - name: AddNumber
    options:
      separator: "_"
validators:
- pattern: "/Images/*.jpg"
  actions:
  - name: validate
    options:
      pattern: "/^\\w+_\\d{4}\\.jpg$/"

Actions

Available actions:

  • AddDirectoryName: Adds directory name to the filename. Options:
    • separator: Separator to use between the directory name and the file name. Defaults to no separator.
  • AddNumber: Adds incremented number to the filename.
    • separator: Separator to use between the number and the file name. Defaults to no separator.
  • DropName: Drops the filename.

About

Renamer is a batch file renaming tool that allows you to rename lots of files quickly and conveniently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages