Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-06-02 08:57:44

Luckyfriend222
Member
Registered: 2013-06-02
Posts: 2

Examples of Search and Replace in bulk rename

Hi guys

I am very new to the linux environment, and to be honest, struggling quite a bit.

Previously I used a tool called Bulk Rename utility for nenaming a batch of files at once.  I came across the Thunar app, but now i am struggling to understand how it will go about doing the same thing as the above mentioned program did for me in Windows.

Let me show you what I mean.  Say for instance I have a file called XYZ.s01e10.garbage.lala.extension. With BRU I used to enter the following expression for search and replace:

s0([0-9])e([0-9]{2}) and then replace with XYZ \1\2.  The output file will then be XYZ 110.extension

As most of you will know \1 equals the result of the search of ([0-9]) and \2 equals result of the last part.  The { } just shows that the search must look for specified items twice.

My question is how to I replicate this in Thunar?  I have tried a few examples, but none of them seem to work as well as what I am used too.

Any help will be greatly appreciated!

PS: I have searched, and found nothing that resembles this question, so sorry if I may have overlooked a specific search result.  It was not out of arrogance, but a simple mistake.

Thanx in advance!

Last edited by Luckyfriend222 (2013-06-02 08:58:44)

Offline

#2 2013-06-02 10:21:54

Pindakoe
Member
From: NL
Registered: 2003-11-26
Posts: 116

Re: Examples of Search and Replace in bulk rename

I don't think Thunar can due RegExp like this. You are probably better off doing such renames using a BASH script.

Offline

#3 2013-06-02 13:15:25

k-bag
Member
Registered: 2012-06-11
Posts: 15
Website

Re: Examples of Search and Replace in bulk rename

Hi.

The best method to do it is to use a shell script, or you can try some graphical renamer utility as Pyrenamer.

Offline

#4 2013-06-02 18:48:36

Luckyfriend222
Member
Registered: 2013-06-02
Posts: 2

Re: Examples of Search and Replace in bulk rename

Thanks for the replies guys.  pyRenamer has given me some difficulty installing on a virtual, but I should probably give it another go then.  Sad that this tool cannot do it. It looked so promising.

Thanks again guys, really appreciate it. Will give pyRenamer some go again and see if I can get to a point where it is successful.

Cheers!

Offline

#5 2013-06-04 02:35:23

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: Examples of Search and Replace in bulk rename

You can do it with Thunar. Select “Search and replace”, tick “Regular expression”, select “Name only” and enter:

(.+)S0([0-9])E([0-9]+).+
$1$2$3

I don’t approve of this renaming though tongue.

Offline

#6 2015-09-01 12:55:00

fedya
Member
Registered: 2015-08-06
Posts: 3

Re: Examples of Search and Replace in bulk rename

Doing it the shell script way is the way it should be however there are BatchRenameFiles Tool for renaming purpose as well.

Offline

Board footer

Powered by FluxBB