Socket
Book a DemoInstallSign in
Socket

nrename

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nrename

0.2.6
bundlerRubygems
Version published
Maintainers
1
Created
Source

Build Status Dependency Status Code Climate

Nrename

Command-line utility for renaming numbered files.

Installation

gem install nrename

Compatibility

This gem does not have any external runtime dependencies, nor does it use any fancy language features/syntax, so it works on pretty much every Ruby implementation out there.

Description

When you have a set of files like:

1.txt
2.txt
10.txt
11.txt
99.txt
100.txt

it's hard to get a list of them in order (from 1.txt to 100.txt). Shell of file manager will usually sort them starting from first symbol in filename, like this:

1.txt
10.txt
100.txt
11.txt
2.txt
99.txt

Nrename lets you rename such files so that they have equal number of digits in names:

001.txt
002.txt
010.txt
011.txt
099.txt
100.txt

Usage

$ nrename --help
Usage: nrename [OPTINS] DIR...

Options:
    -X, --execute                    Do actual work
    -R, --recursive                  Process given directories recursively
    -N, --numbers-only               Leave only numbers in file name
    -D, --rename-dirs                Rename only directories instead of regular files
        --renumber                   Renumber files from starting from 1 and on
        --regexp REGEXP              Use REGEXP to match filenames
    -v, --[no-]verbose               Run verbosely
    -h, --help                       Display this message
        --version                    Display version

FAQs

Package last updated on 23 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.