Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-06-16 21:13:31

Damien Moore
Member
Registered: 2013-06-16
Posts: 2

[Solved] bulk renaming syntax problem

I suspect I am not alone in having recently discovered Xfce after upgrading to Debian 7 and finding that the Gnome people have taken leave of their senses. Every cloud has a silver lining! Thank you for your efforts and long may they continue.

As to my specific query, I am trying to use the Bulk Renamer to rename a very large number of files, but have been defeated by the "regular expression" syntax. All the files have names of the form:
[some letters][space][hyphen][some more letters][space][hyphen][DATE][suffix]
and I want to rename all of them in the form:
[DATE][space][some letters][space][hyphen][some more letters][suffix]
The number of letters in [some letters] and [some more letters] is variable and may include spaces. The suffix is always the same and the DATE field is always of the form:
YYYYMMDD HH:MM
Any suggestions?

Offline

#2 2013-06-17 09:07:45

Damien Moore
Member
Registered: 2013-06-16
Posts: 2

Re: [Solved] bulk renaming syntax problem

I found another posting on this forum which suggested using Pyrenamer, and having tried find that it does what I need. It is a "bulk renamer" which presents a pattern matching facility with a syntax much simpler than PCRE. I will add it to my list of essential utilities alongside such luminaries as Dosemu, Hardinfo and Gtkam.

Offline

#3 2013-06-20 14:42:02

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

Re: [Solved] bulk renaming syntax problem

For what it’s worth, here’s how you can do it with Thunar. It is not so complicated.

To match any word that ends with a space, you can use “[^ ]+”.  This means “1 or more non-space characters”. (“^” means “not”, and “+” means “one or more”.)

In order to be able to move your words around, you have to use parenthesis to make groups, and then use $1, $2… in the “Replace With” field to recall them.

So your source name matches: ([^ ]+) -([^ ]+) -([^ ]+ [^ ]+)
And in the replace field: $3 $1 -$2

Last edited by stqn (2013-06-20 14:43:00)

Offline

#4 2015-08-06 10:14:19

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

Re: [Solved] bulk renaming syntax problem

I have tried BatchRenameFiles Tool quite a few times.

Offline

Board footer

Powered by FluxBB