Nemo's new bulk rename feature

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
daveinuk
Level 7
Level 7
Posts: 1545
Joined: Tue Mar 23, 2010 7:52 pm
Location: Manchester, England.
Contact:

Nemo's new bulk rename feature

Post by daveinuk » Sun Dec 27, 2015 8:07 am

Howdy Folks,

Just recently upgraded my Petra/LM16 desktop to 17.3, I've come across the bulk rename feature that is now present in Nemo file manager but it seems to be off by default and I've found where it hides within preferences but it seems to need a command to invoke when renaming files and I just don't know what should be in there, could someone point me to examples that I can adapt and does anyone have experience of using this new feature?

thank you

Dave

User avatar
MagicMint
Level 3
Level 3
Posts: 140
Joined: Fri May 31, 2013 1:29 pm

Re: Nemo's new bulk rename feature

Post by MagicMint » Sun Dec 27, 2015 11:05 am

It’s not exactly a “new” feature, as it has been around since LM 17. It’s still a bit buggy, and needs manual configuration, though :mrgreen:

See the tutorial “Some Help With Nemo’s Bulk Renaming”.

User avatar
daveinuk
Level 7
Level 7
Posts: 1545
Joined: Tue Mar 23, 2010 7:52 pm
Location: Manchester, England.
Contact:

Re: Nemo's new bulk rename feature

Post by daveinuk » Mon Dec 28, 2015 7:27 am

It's new to me, I came to find it from Petra, LM16.

I'll just use pyrenamer instead, if the feature isn't really a feature and you have to use something else to make it work, it's not really a feature lol . . . . . . :lol:

I used pyrenamer previously, I can't follow what your saying on that link about caveats/problems, I just went into a folder with a load of pics I wanted to rename, selected them and the changes I wanted to make to the file name and it just worked, I'll stick with that, it just seems easier to me, I only ever really rename batches of photographs that I've sorted into folders so that works for me, I appreciate the suggestions though, cheers.

Cosmo.
Level 23
Level 23
Posts: 17829
Joined: Sat Dec 06, 2014 7:34 am

Re: Nemo's new bulk rename feature

Post by Cosmo. » Mon Dec 28, 2015 10:19 am

I use gprename and have created an action for it.
Create in ~/.local/share/nemo/actions the file gprename.nemo-action (the primary filename is your choice, the extension is needed.
Open it in a text editor and enter:

Code: Select all

[Nemo Action]

# Whether this action is active.  For troubleshooting.
# Optional - if this field is omitted, the action will be active
Active=true

Name=Multiple Rename

# Tool tip, locale supported (Appears in the status bar)
Comment=Multiple Rename with GPRename.  The action gets executed for the marked or the higher level directory.

# What to run.  Enclose in < > to run an executable that resides in the actions folder.
# **** REQUIRED ****
#Exec=gedit %F
Exec=gprename %F

# Icon name to use in the menu - must be a theme icon name
# Icon-Name=

# What type selection: [s]ingle, [m]ultiple, any, notnone, none (background click), or
# a number representing how many files must be selected to display.
# ****** REQUIRED *******
Selection=any

# What extensions to display on - this is an array, end with a semicolon
# Single entry options, ending in a semicolon:
#     "dir" for directory selection
#     "none" for no extension.
#     "nodirs" for any selection, but not including directories.
#     "any" for any file type, including directories.
# Individual specific extensions can be a semicolon-terminated list
# Extensions are NOT case sensitive.  jpg will match JPG, jPg, jpg, etc..
# **** EITHER EXTENSIONS OR MIMETYPES IS REQUIRED *****
Extensions=any;

# Escape Spaces - set to true to escape spaces in filenames and uris ($U, $F, $P, $D)
#
# Sometimes this may be preferred to getting raw filenames that must be enclosed in
# quotes.
#
# Optional - by default this is false
EscapeSpaces=true
You can define an icon in the respective line and remove the leading # to make it work.

This does not work exactly as you might expect at first, but it works and gives you an graphical environment for bulk renaming. Launch the action from the context menu. (Tested with Cinnamon 2.4). See also the comment in Nemo's status bar, if you hover the action in the context menu with the mouse.

(Credits for the basic structure of the file go to the Mint dev team.)

User avatar
MagicMint
Level 3
Level 3
Posts: 140
Joined: Fri May 31, 2013 1:29 pm

Re: Nemo's new bulk rename feature

Post by MagicMint » Mon Dec 28, 2015 11:44 am

daveinuk wrote:I can't follow what your saying on that link about caveats/problems, I just went into a folder with a load of pics I wanted to rename, selected them and the changes I wanted to make to the file name and it just worked, I'll stick with that, it just seems easier to me, I only ever really rename batches of photographs that I've sorted into folders so that works for me
It’s quite simple, though: if you use pyRenamer directly, it replaces Nemo’s bulk rename functionality, whereas called from inside Nemo, it doesn’t get the file selection made inside the file manager. The difference is whether you want to navigate in Nemo to your folders, or not :|

User avatar
MagicMint
Level 3
Level 3
Posts: 140
Joined: Fri May 31, 2013 1:29 pm

Re: Nemo's new bulk rename feature

Post by MagicMint » Mon Dec 28, 2015 11:48 am

Cosmo. wrote:I use gprename and have created an action for it.
Everything goes, but the bulk rename features works as the simple one from within the menu, or with the [F2] shortcut, not just from the context menu :)

Cosmo.
Level 23
Level 23
Posts: 17829
Joined: Sat Dec 06, 2014 7:34 am

Re: Nemo's new bulk rename feature

Post by Cosmo. » Mon Dec 28, 2015 3:29 pm

At the time I investigated in that matter I found 2 issues:

I like gprename much better than pyrenamer. And I don't like another file manager just for renaming (thunar) not at all.
Don't ask me what I missed in pyrenamer, I cannot remember. (Maybe the undo function, maybe something else)

There is or was the bug in Nemo with file names with included spaces in context with this feature. I don't know (did no newer investigation) if this bug still valid, but at that time I chose the described solution it was a no-go.

So my solution is not just another way, it is the best I found. If reaching the function (action) should be concern: It does appear in the file-menu also.

User avatar
MagicMint
Level 3
Level 3
Posts: 140
Joined: Fri May 31, 2013 1:29 pm

Re: Nemo's new bulk rename feature

Post by MagicMint » Wed Dec 30, 2015 6:37 pm

Cosmo. wrote:I like gprename much better than pyrenamer. And I don't like another file manager just for renaming (thunar) not at all. Don't ask me what I missed in pyrenamer, I cannot remember. (Maybe the undo function, maybe something else)
Your feeling could be right about all these renaming utilities. In fact, no one seems to be a perfect solution for this task: I don’t really like any of them, either :x
Cosmo. wrote:There is or was the bug in Nemo with file names with included spaces in context with this feature. I don't know (did no newer investigation) if this bug still valid, but at that time I chose the described solution it was a no-go.
Unfortunately, it’s been still there, the last time I checked a month ago. The corresponding issue(s) are still open on GitHub, although a patch to fix URI handling has been proposed lately.
Cosmo. wrote:If reaching the function (action) should be concern: It does appear in the file-menu also.
I didn’t think of looking for a custom action there, but there they are, indeed :wink:

Cosmo.
Level 23
Level 23
Posts: 17829
Joined: Sat Dec 06, 2014 7:34 am

Re: Nemo's new bulk rename feature

Post by Cosmo. » Wed Dec 30, 2015 6:41 pm

MagicMint wrote:
Cosmo. wrote:There is or was the bug in Nemo with file names with included spaces in context with this feature. I don't know (did no newer investigation) if this bug still valid, but at that time I chose the described solution it was a no-go.
Unfortunately, it’s been still there, the last time I checked a month ago. The corresponding issue(s) are still open on GitHub, although a patch to fix URI handling has been proposed lately.
This info saves me the time to re-check myself. And it keeps the Nemo-function a no-go for me and leaves my solution with the Nemo-action the best available method.
MagicMint wrote:
Cosmo. wrote:If reaching the function (action) should be concern: It does appear in the file-menu also.
I didn’t think of looking for a custom action there, but there they are, indeed :wink:
Even on the desktop.

Post Reply

Return to “Software & Applications”