Sha256: 8a279f1b3a0bbc5d42ed5b3fbd36ed81a4239c956dde1192caacbde6c3071b59

Contents?: true

Size: 1.43 KB

Versions: 3

Compression:

Stored size: 1.43 KB

Contents

# Mvmv

Simple batch renaming script.

## Installation

    $ gem install mvmv

## Usage

```
usage:    mvmv [OPTIONS] <command> [<args>] <files>

commands:
          mvmv prefix       <prefix>     <files>
          mvmv suffix       <suffix>     <files>
          mvmv name         <name>       <files>
          mvmv name-suffix  <suffix>     <files>
          mvmv ext          <.extension> <files>
          mvmv upper                     <files>
          mvmv lower                     <files>

          mvmv regexp       <from> <to>  <files>
          mvmv regexpi      <from> <to>  <files>
          mvmv name-regexp  <from> <to>  <files>
          mvmv name-regexpi <from> <to>  <files>

options:
          -f, --force       Force rename
              --no-color    Disable ANSI color codes
```

## Examples

### Adding simple prefix and suffix to files

```
mvmv prefix old_ *.txt
mvmv suffix .bak *.txt
```

### Numbering files

You can attach sequence numbers to files with a series of `#`s.
Depending on the number of `#`s, numbers will be padded with zeros.

```
mvmv name Photo#### *.jpg *.gif *.png
mvmv name-suffix -## *.jpg
```

### Advanced renaming with regular expressions

`regexp` command performs regular expression substitutions. (`regexpi` is the case-insensitive version.)
`name-regexp` command performs regular expression subsitution only on the name parts of the given files.

```
mvmv name-regexp '^(.*)_-_(.*)$' '\2 - \1' *.mp3
```

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mvmv-0.1.2 README.md
mvmv-0.1.1 README.md
mvmv-0.1.0 README.md