0.0
No commit activity in last 3 years
No release in over 3 years
Bulk cleanup/rename folders name that contain special characters with valid string (dash, dot, underscore, etc)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 2.6
~> 5.4
~> 0.10
~> 12.3
~> 0.53
~> 0.9

Runtime

 Project Readme

folders_renamer

Gem Version Dependency Status Code Climate Build Status

Rename/cleanup folder names using the simple rules. For optimal result you may like also like to try my filename_cleaner gem which clean/rename the bad file names.

Features

  • Rename directory recursively from any starting location
  • Replace unwanted characters with value of your choice using --sep-string option (default to . (dot))
  • Following the Semantic Versioning for release schedule
  • Quickly rename bad folder names to good folder names with one command.

TL;DR;

Turn these directories (if your OS allow you to have these names)

some_folder/
├── aa!@#$!01
│   └── bb#@#$@#$@01
├── aa**#$@#$#@$aa
    └── bb$@#$#@$@#bb
        └── cc#$!#$@#cc!!!

into these directories

some_folder/
├── aa_01
│   └── bb_01
├── aa_aa
    └── bb_bb
        └── cc_cc

using command like:

cd ~/path/to/some_folder/

# Perform the dry-run to see what will be changed (no changes)
folders_renamer --sep-string _

# Commit your changes
folders_renamer --sep-string _ --commit

Installation

gem install folders_renamer

Usage/Synopsis

Type the folders_renamer without any options, which will give the following output

Usage:
  folders_renamer -b, --base-dir=BASE_DIR -s, --sep-string=SEP_STRING

Options:
  -b, --base-dir=BASE_DIR        # Starting directory
                                 # Default: . (current directory)
  -s, --sep-string=SEP_STRING    # Separtor string to use
                                 # Default: .
  -c, [--commit], [--no-commit]  # Commit your changes (defalt --no-commit)
  -v, [--version=VERSION]        # Display version number

Cleanup and rename folders

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request