rntools: An unexpected find

I have an application called “rn” in my list but I couldn’t find that anywhere. But I did find something called rntools, while I was digging around.

rntools is probably the safest, least unpredictable renaming tool I’ve seen so far. Even qmv, out of renameutils, has a few quirks that rntools manages to avoid.

2014-04-01-lv-r1fz6-rntools

For one thing, although rntools is menu-driven, there are some flag options. This is a bonus, since it means you can avoid long, boring command sequences with the menu mode, but also inject it into a script or give it quick commands to complete.

The menus cover a lot of possibilities, from simple case switches to complex search-and-replaces. And after you’ve made your selection and provided it with the info it needs, rntools will double-check that you’re getting the results you want before proceeding.

So you get the opportunity to back out, or reject your changes altogether. Nice touch.

All that is fine and dandy, but I do have a couple of small suggestions.

First of all, it’s no trick to make rntools crash, perhaps most easily by forcing it to rename files to some illegal sequence. I caused havoc just by renaming my data files to something starting with a hyphen, which the underlying rename process took to be a command-line flag.

Second, a couple of the options are a little too cautious. As you can see above, the command to cut characters out of a name asked me to confirm the title each time for each file. That’s not saving me any time if I have a hundred files to plod through, one by one.

On the whole though, rntools is a good option for safer, more meticulous file renaming on a large-scale basis. And hey, it’s got color. Can’t go wrong with that. πŸ˜‰

P.S.: I only saw rntools in AUR, so Debian users might have to build it on their own. It shouldn’t be too much of a challenge. πŸ˜‰

10 thoughts on “rntools: An unexpected find

  1. CorkyAgain

    My bad. rn stands for “read news”, but the readnews program was not the same as rn.

    1. K.Mandla Post author

      No problem, thanks for the link. I spent a good 15 minutes trying to figure out what that was. I’ll see if I can squish it in with the rest of the R section before it’s over. Cheers! πŸ™‚

  2. darkstarsword

    Regarding filenames starting with a hypthen – I haven’t used rntools, but the standard way to deal with these cases is to pass in a double hyphen by itself which signifies that no further parameters are to be interpreted as options – this is a standard convention supported by all common option parsing libraries, so it works with just about every program even if they didn’t explicitly add support for it:

    ian@dukhat~/f1 [i]> touch -foo
    touch: invalid option -- 'o'
    Try 'touch --help' for more information.
    ian@dukhat~/f1 [i]> touch -- -foo
    ian@dukhat~/f1 [i]> ls
    -foo
    ian@dukhat~/f1 [i]> mmv '-*' '--#1'
    Usage: mmv [-m|x|r|c|o|a|l] [-h] [-d|p] [-g|t] [-v|n] [from to]
    
    ian@dukhat~/f1 [i]> mmv -- '-*' '--#1'
    ian@dukhat~/f1 [i]> ls
    --foo
    ian@dukhat~/f1 [i]> rm --foo
    rm: unrecognized option '--foo'
    Try 'rm ./--foo' to remove the file β€˜--foo’.
    Try 'rm --help' for more information.
    ian@dukhat~/f1 [i]> rm -- --foo
    ian@dukhat~/f1 [i]> ls
  3. darkstarsword

    Looks like wordpress substituted HYPHEN-MINUS, HYPHEN-MINUS for EM DASH, so don’t try copy/pasting my examples :-/

      1. darkstarsword

        Looks good to me, thanks!
        BTW, I’m loving this blog, learning heaps of new stuff πŸ™‚

  4. Pingback: Links 9/4/2014: Applications | Techrights

Comments are closed.