Code: Select all
[Nemo Action]
Active=true
Name=pyRenamer
Exec=pyrenamer %P
Icon-Name=pyrenamer
Comment=rename multiple files
Selection=m
Extensions=any;
but does anyone know how to setup bulk rename function here in NEMO, see pic below:
Code: Select all
[Nemo Action]
Active=true
Name=pyRenamer
Exec=pyrenamer %P
Icon-Name=pyrenamer
Comment=rename multiple files
Selection=m
Extensions=any;
Code: Select all
sudo apt-get install thunar
Code: Select all
# File: /home/username/.local/share/nemo/actions/thunar_bulk_rename.nemo_action
# Nemo Action to facilitate bulk renaming of selected files.
# The file manager 'thunar' must be installed for its '--bulk-rename' facility.
# Install Thunar with: sudo apt-get install thunar
[Nemo Action]
Name=Bulk Rename
Comment=Bulk rename selected files
Exec=thunar --bulk-rename %F
Icon-Name=thunar
Selection=notnone
Extensions=any;
Quote=double
I had another look at this today and wrote a very simple Bash script to see what is sent to the Edit-->Preferences-->Behaviour 'Bulk Rename - command to invoke' (hereafter bulk command) by Nemo.mattst wrote:The 'Bulk Rename - command to invoke' in Nemo Edit-->Preferences-->Behaviour is not usable. Using 'thunar --bulk-rename %F' works only if none of the file paths contain a space character.
Code: Select all
#!/bin/bash
echo $@ > /home/user/Temp/TestBulkRename/arglist
Code: Select all
Bulk command == /Path/To/BashScriptAbove %F
Files selected in Nemo:
/home/user/Temp/TestBulkRename/TestBulkRename-1
/home/user/Temp/TestBulkRename/TestBulkRename-2
/home/user/Temp/TestBulkRename/TestBulkRename-3
Output:
file:///home/user/Temp/TestBulkRename/TestBulkRename-1 file:///home/user/Temp/TestBulkRename/TestBulkRename-2 file:///home/user/Temp/TestBulkRename/TestBulkRename-3
Files selected in Nemo:
/home/user/Temp/TestBulkRename/Path With Spaces In It/Test Bulk Rename-1
/home/user/Temp/TestBulkRename/Path With Spaces In It/Test Bulk Rename-2
/home/user/Temp/TestBulkRename/Path With Spaces In It/Test Bulk Rename-3
Output:
file:///home/user/Temp/TestBulkRename/Path0With0Spaces0In0It/Test0Bulk0Rename-1 file:///home/user/Temp/TestBulkRename/Path0With0Spaces0In0It/Test0Bulk0Rename-2 file:///home/user/Temp/TestBulkRename/Path0With0Spaces0In0It/Test0Bulk0Rename-3
I'd like them to fork the "thunar --bulk-rename" dialog and add code so that it remembers its size between uses. I downloaded the source and found the initial size code so that I could at least set it to a sensible size. But I gave up trying to compile it after 15 mins, I'm not going to spend hours to do something that only takes me a few seconds even if it is every time I use the rename dialog (which is quite often).Paper Bag wrote:Thank you mattst. Other than missing F2 press, this is pretty much ideal and replicates old nautilus-renamer functionality. Thunar's renamer is also pretty similar to that in simplicity.
Nemo team should just fork the Thunar code and make it a built in feature.
Try gdevilspie.mattst wrote:I'd like them to fork the "thunar --bulk-rename" dialog and add code so that it remembers its size between uses. I downloaded the source and found the initial size code so that I could at least set it to a sensible size. But I gave up trying to compile it after 15 mins, I'm not going to spend hours to do something that only takes me a few seconds even if it is every time I use the rename dialog (which is quite often).Paper Bag wrote:Thank you mattst. Other than missing F2 press, this is pretty much ideal and replicates old nautilus-renamer functionality. Thunar's renamer is also pretty similar to that in simplicity.
Nemo team should just fork the Thunar code and make it a built in feature.
mattst wrote:I found your post with a web search trying to solve the same problem.
The 'Bulk Rename - command to invoke' in Nemo Edit-->Preferences-->Behaviour is not usable. Using 'thunar --bulk-rename %F' works only if none of the file paths contain a space character. When using a Nemo Action a quote character can be specified so that filenames/paths containing spaces can be handled correctly but with Nemo Preferences there appears to be no way to specify to enclose the file paths of the selected files in double quotes.
My own Nemo Action solution is similar to yours but instead of using pyRenamer it uses 'thunar --bulk-rename' which I think is a better solution: only files that were selected are shown, no directory tree, dynamic preview (always displayed), and regex support in search/replace. The first of these reasons is the most important as pyRenamer can not be given a list of the files you want to rename, it can only take only a directory and you must highlight the files you wish to rename using the pyRenamer interface once it has loaded. Using 'thunar --bulk-rename' with my Nemo Action (below) only the files you have selected in Nemo are shown by the bulk rename GUI.
In case you don't know, Thunar is a file manager. I only have it installed for it's '--bulk-rename' option which brings up the bulk rename window without loading the file manager itself (which I never use). My only criticism of it is that it does not store your window resizing preferences between invocations.
My 'thunar --bulk-rename' Nemo Action file is here:Code: Select all
sudo apt-get install thunar
Note: The use of 'Quote=double' means that filenames containing spaces or single quote characters can be renamed, but that filenames with double quote characters can not be - not a problem for me as I never use double quotes in filenames.Code: Select all
# File: /home/username/.local/share/nemo/actions/thunar_bulk_rename.nemo_action # Nemo Action to facilitate bulk renaming of selected files. # The file manager 'thunar' must be installed for its '--bulk-rename' facility. # Install Thunar with: sudo apt-get install thunar [Nemo Action] Name=Bulk Rename Comment=Bulk rename selected files Exec=thunar --bulk-rename %F Icon-Name=thunar Selection=notnone Extensions=any; Quote=double
Hope this helps.
Code: Select all
[Nemo Action]
Name=Bulk Rename
Comment=Bulk rename selected files
Exec=thunar --bulk-rename %F
Icon-Name=thunar
Selection=notnone
Extensions=any;
Quote=double
Code: Select all
thunar --bulk-rename