Code Monkey home page Code Monkey logo

renamer's Introduction

renamer

renamer is a batch file renaming tool

GoDev CI

Features

  • Simple
  • Statically compiled binaries
  • Regular expression match and replace

Install

Binaries

Releases Releases

Find the latest pre-compiled binaries here or download and install it now with curl https://i.jpillora.com/renamer! | bash

Source

$ go get -v github.com/jpillora/renamer

Usage

$ renamer --help

  Usage: renamer [options] <rule> <target> [target] ...

  renamer is a regular-expression based batch file renaming tool

  <rule> should be in the form:

    <find>:<replace>           for plain text matching, or
    /<find>/<replace>/<flags>  for regular expression matching

    by default, <find> and <replace> only operates on the input
    file's basename (the last part of the file). this ensures
    files are *renamed* and not *moved*. if you'd like to operate
    on the full (absolute) path, you can enable the --fullpath flag.

    plain text matching only finds and replaces the first instance
    of <find>. if you need to replace all instances, use regular
    expression matching with the 'g' flag.

    regular expression matching uses the go regular expression
    engine (https://golang.org/pkg/regexp/). the format above uses
    slash / as the field separator, however any character may be
    used, as long it appears exactly 3 times. regular expression
    groups may also be used, and replaced back into the result
    using $N placeholders ($1 for the first group, $2 for second, etc).

    regular expression flags can be:
      i - enables case-insensitive matching
      g - enables global matching, instead of the
          default single-instance matching

  <target> must refer to an existing file or directory. by default
  a directory target will be renamed, however the --recursive flag
  will change this behaviour to recurse into directories and use the
  directory contents as more targets.

  Options:
  --recursive, -r  recurse into directories instead of renaming them
  --dryrun, -d     read-only mode for testing renames
  --fullpath, -f   find and replace against the targets full path
  --overwrite, -o  allow existing files to be overwritten
  --verbose, -v    enable verbose logs
  --limit, -l      rename limit tries to prevent you from renaming your
                   whole file system (default 1000)
  --version        display version
  --help, -h       display help

  Version:
    0.0.0-src

  Read more:
    github.com/jpillora/renamer

Credits

renamer in Node https://www.npmjs.com/package/renamer

renamer's People

Contributors

jpillora avatar

Stargazers

Jonno avatar Lubomir Anastasov avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.