topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:23 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: N.A.N.Y. 2019: remv: Rename files (and directories) with regular expressions  (Read 8455 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name remv
Version 2.0.0
Short Description A sane way to rename files/directories with a regular expression.
Supported OSes Any, as long as we have a C++17 compiler.
Web Page https://www.donation...ndex.php?topic=44941
Download Link Attached in the "website" topic.
System Requirements
  • Binary: Windows.
  • Compile yourself: Any that has a new(ish) Clang compiler set.
Version History
  • check constants.hpp
Author whatever

Description
remv should solve my regular problem of having to recursively rename files according to a regex pattern.

Features
- Renames files and folders.
- Can simulate that as well.

Screenshots

(Sorry - attachments don't currently work.)

Usage
Installation
Unpack the .exe anywhere (or build one wherever you want).

Using the Application
USAGE:
        remv [COMMANDS]
        remv [OPTIONS] <regex> <replacement> [<startpath>]

 OPTIONS (any combination):
        -r      Recurse into subdirectories.
        -E      Skip file extensions while renaming.
        -d      Also rename directories on the way.
        -s      Sets the start directory to the last parameter;
                else, remv will start in '.'.
        -f      Only replaces the first occurrence in each name.
        -v      Verbose logging.
        -vv     Very verbose logging.
        -n      Dry run - don't modify anything just yet.

 COMMANDS:
        -V      Display the remv version and exit.
        -h      Display this help screen and exit.

 You can use $1, $2 etc. in your replacement strings for back-
 references.

Uninstallation
Delete the executable file. You might want to add its path to your %PATH% if you want easier access.

Tips
Don't.  ;D

Known Issues
It sucks!
« Last Edit: June 01, 2022, 09:26 AM by Tuxman »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Intriguing...and I look forward to using it in the future should the need arise.   :Thmbsup:

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Thank you!  :)

Lintalist

  • Participant
  • Joined in 2015
  • *
  • Posts: 120
    • View Profile
    • Lintalist
    • Donate to Member
Nice - Reminds me of a program I used long ago, called gren (which was just a compiled perl script afaik).
Archived page here http://web.archive.o...karpo/gren/gren.html (from 2002)
"GREN can do all things DOS's RENAME can. However, GREN's power comes from being able to understand Perl's regular expressions (REGEXPs)."

I still have the program although I haven't used it this decade - attached for those interested as the archived download link might not work.


Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Never heard of that! Too late now - damn.