Mass Rename and RegEx

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
admsupport
Bronze Member
Bronze Member
Posts: 142
Joined: 2008 Dec 11, 00:18
Location: Japan

Mass Rename and RegEx

Post by admsupport »

Can I use Regular Expressions with the Mass rename function?

Example: to modify the separator characters of multiple files without changing the file's names?

Changing: Name, Date.ext & Name - Date.ext to Name_Date.ext

I couldn't find a way to achieve this using special tokens.
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

You only have these $-tokens to play with. You can do a lot of useful things with them, but it is not a full-fledged Regular Expression language. This kind of search and replace inside the Basename, like you are proposing, is not possible.
You should get a specialised tool for that like 'Renamer' for example (works pretty well with X2, I've got a custom user command:

Code: Select all

>> "C:\Program Files\ReNamer\renamer.exe" /enqueue "$F"
that puts all selected file in Renamer)
User avatar
admsupport
Bronze Member
Bronze Member
Posts: 142
Joined: 2008 Dec 11, 00:18
Location: Japan

Post by admsupport »

Mr.Pleasant wrote:You should get a specialised tool for that like 'Renamer' for example (works pretty well with X2, I've got a custom user command:

Code: Select all

>> "C:\Program Files\ReNamer\renamer.exe" /enqueue "$F"
that puts all selected file in Renamer)
From Denis Kolov? yes, that's the best app I have found so far (with metamorphose2). Thanks for the user command :idea: however it failed with .mht files? I did not try it with all the majore file extensions yet. What about you?
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

Sorry, I don't understand. You mean to say that the user command puts all file formats into the Renamer, except for .mht files? That would be weird.
I did notice however that not on every computer this user command puts all selected files into Renamer. It seems to fail on those computers in random cases. Don't know why that is. Probably this commandline interface of Renamer has its quirks.
User avatar
admsupport
Bronze Member
Bronze Member
Posts: 142
Joined: 2008 Dec 11, 00:18
Location: Japan

Post by admsupport »

Mr.Pleasant wrote:You mean to say that the user command puts all file formats into the Renamer, except for .mht files? That would be weird.
That what I meant, but I have only tested this command with a few file extensions (.pdf, .xps, .doc and .mht) that did not work with the .mht files. However it is still very handy with the other file extensions :D
Last edited by admsupport on 2009 Jan 04, 13:32, edited 1 time in total.
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

Just tried it: files with the extensions .mht behave the same as files with different extensions.
Maybe it is that quirky command line in combination with your computer?
Wepver
Bronze Member
Bronze Member
Posts: 79
Joined: 2008 Apr 29, 16:29

Post by Wepver »

I would like to see a Mass Rename, like the one of TotalCommander, implemented in X2.
It makes what you want to accomplish easily thanks to its graphical interface.
Maybe you could try it if you did not find a better solution.
User avatar
admsupport
Bronze Member
Bronze Member
Posts: 142
Joined: 2008 Dec 11, 00:18
Location: Japan

Post by admsupport »

Mr.Pleasant wrote:Maybe it is that quirky command line in combination with your computer?
Hey Mr. Pleasant, thanks for the feedback. I will try again then. My system if very old. That could be the reason. I am waiting for the final scream of the HD to re-install :wink:
User avatar
admsupport
Bronze Member
Bronze Member
Posts: 142
Joined: 2008 Dec 11, 00:18
Location: Japan

Post by admsupport »

Wepver wrote:I would like to see a Mass Rename, like the one of TotalCommander, implemented in X2.
It makes what you want to accomplish easily thanks to its graphical interface.
Maybe you could try it if you did not find a better solution.
Hello Wepver,
I am very please with X2, so there is litte chances I change for a another file management software, but thank you. One of my post above has a link to the renamer, I used it long before knowing x2, and I find these 2 soft complementary for a good file management. Renamer is at renaming files what x2 is at replacing windows explorer :D
Wepver
Bronze Member
Bronze Member
Posts: 79
Joined: 2008 Apr 29, 16:29

Post by Wepver »

Maybe I did not explain well myself. What I was trying to say was not that you should change your file manager, but just to use TotalCommander’s mass rename function if you were in a hurry and you needed a fast and easy solution.

I only use x2 as file manager and in very rare occasions TotalCommander, and just because its great and intuitive mass rename function. But from now on maybe I will use ReNamer because it has an easy graphical interface and it is freeware. Thank you for introducing it to me.  :wink:

In spite of everything I hope to see an easier and more powerful mass rename function implemented in x2.  :|
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Thanks for this tip. Indeed ReNamer is a gem! It has a simple-looking GUI that hides a lot of powerful commands, all logically arranged. I will replace "THE Rename" with this worthy successor in the User Manual!

BTW ReNamer has a "send to" option. Once you select it, you can select files/subfolders in x2 and use the "Send to-" context menu to send all the selected items to ReNamer. (That command is not required! )

Further, ReNamer also has another option if you want to send the contents of the selected subfolder(s) recursively. Yet another option highlights the files that would be changed, by showing them in red. Most importantly, it can handle Unicode and RegEx.

******
The mass renamer is a separate category by itself. So a file manager would have only basic mass-renaming features, and more advanced jobs are better handed over to a mass renamer.

And x2+ReNamer combination is great.
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1255
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

ReNamer seems interesting... I'll play with it some.

A quick question... can it be used to rename folders?
When I select folders it loads the files the folders contain.
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

Go 'Settings' > 'Filters', second option: 'add folders as files'
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

narayan wrote:ReNamer is a gem! It has a simple-looking GUI that hides a lot of powerful commands, all logically arranged. I will replace "THE Rename" with this worthy successor in the User Manual!

BTW ReNamer has a "send to" option. Once you select it, you can select files/subfolders in x2 and use the "Send to-" context menu to send all the selected items to ReNamer.
...
@ worthy successor -     INDEED! :thumbup:
ref: http://www.den4b.com/downloads.php?project=ReNamer

... and I have it set to place a context menu item under "Send to:"
{find it in ReNamer under Settings | Miscellaneous }