View previous topic :: View next topic |
Author |
Message |
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 8:24 am Post subject: search: good mass rename tool |
|
|
Hi everyone!
I am looking for a good and sophisticaded renaming tool. No, "rename" is not powerful and comfortable enough.
I would love to see something like the menu of "Total Commander". There you could use something like "[N4-7] [N1-3]" which would make your name consist first of the 4-7 and then of the 1-3 char of the old name. Optionaly there could be some counters in it and one could make all names capital.
I tried out almost all filemanagers (gentoo, worker, xnc, mc, emelfm) with the nc-style and none of them could do even something close to this. I am kind of disappointed. I have been thinking that there are plenty of good tools for proffesional use. No, the console is not good enough. I want to work fast.
And NO, a command consisting of find, grep and rename connected by pipes is not what I consider comfortable or fast.
So anyone knows something for this purpose? It doesnt have to have a gui! |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 8:34 am Post subject: |
|
|
It doesn't have to have a GUI yet a console is not good enough ???
I think you are seriously confused about what you want and what is actually possible.
Go learn some decent shell scripting before coming back to complain, okay ? _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
John-Boy Guru
Joined: 23 Jun 2004 Posts: 442 Location: Desperately seeking moksha in all the wrong places
|
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 8:40 am Post subject: |
|
|
well, console is not good enough but it would be enough if there is nothing better out there. but even if it is console it should be some other tools.
I am not complaining but asking for help. I dont think I am wrong with the non-existance of a good renaming function in any of the popular filemanagers, am I? I would love you to prove me wrong. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 8:43 am Post subject: |
|
|
No, I'm not saying you're wrong about there not being any - I'm sure you've looked.
What I do find rather odd is the way you rant about not wanting to use the traditional, accepted console tools to get your work done - they are there, after all, to be used.
It is like saying: sure, I've got a car, and it works, yeah, but I really really want one of these new mass transportation spells - they are much easier to use, and hey! you get there that much faster.
Not to put too fine a point on it - they don't exist. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 8:52 am Post subject: |
|
|
I just find it pretty strange that linux which is used by many proffesionals doesnt offer any program capable of renaming files in a sophisticated manner. I have been thinking that linux lacks of games, multimedia and hardware support but now my image of it changes. Dont get me wrong. I dont imply: "Oh linux sux I got back to win..." I am just saying what I think.
Quote: | What I do find rather odd is the way you rant about not wanting to use the traditional, accepted console tools to get your work done - they are there, after all, to be used. |
Yes but afaik they dont offer the functions I need. Of course I could write a bash-script to do almost anything. But I just want to rename some files. |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Mon Dec 06, 2004 9:07 am Post subject: |
|
|
Sujao wrote: | I just find it pretty strange that linux which is used by many proffesionals doesnt offer any program capable of renaming files in a sophisticated manner...Of course I could write a bash-script to do almost anything... |
That's how the pros do it. Think about it. Any rename program with enough features to satisfy arbitrary requests like yours would be as difficult to use as the command line tools already included in UNIX-like OSs. |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 10:17 am Post subject: |
|
|
no, total commander does this pretty easy. Well, then tell me how you pros do it. I am still not very familiar with console so maybe I dont know some techniques:
We have file:
Artist - Album Name - 10 - Title comment.MP3
How do you make the following of it?:
10 - Aritst - Title.mp3 |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Mon Dec 06, 2004 10:47 am Post subject: |
|
|
I'm most familiar with PERL regular expressions, and my code might not be the greatest, but...
Code: | #!/usr/bin/perl
opendir( dir, "." );
@files = readdir( dir );
closedir( dir );
foreach $file (@files)
{
chomp( $file );
$file =~ m/(.*) \- (.*) \- ([\d][\d]) \- (.*).(MP3)/;
if( $5 ne "" ) { rename( $file, "$3 - $1 - $4.mp3" ); }
} |
Oh, and I combine Title and comment because in your example there's no way of telling where Title ends and comment begins.
EDIT: if you can't tell from the code, it's meant to be run from a directory containing .MP3 files
GRAMMAR NAZI: you should have used "easily," the adverb form of "easy" |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 10:59 am Post subject: |
|
|
Thx for the help (technical and gramatical) but this is not the kind of solution I was looking for. It might be easy for people knowing pearl but I wouldnt like to write a script for every 10 files I want to rename. |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Mon Dec 06, 2004 11:15 am Post subject: |
|
|
Sujao wrote: | Thx for the help (technical and gramatical) but this is not the kind of solution I was looking for. It might be easy for people knowing pearl but I wouldnt like to write a script for every 10 files I want to rename. |
You don't have to rewrite the script every time. Changing the m/.../ pattern and second argument to rename would be sufficient. If you don't know PERL regular expressions but do know the syntax for an obscure Windows-only program, run the Windows program in WINE if possible. |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 11:25 am Post subject: |
|
|
actually the windows program has no syntax at all, since its a gui. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 11:26 am Post subject: |
|
|
Erm... hate to rock your sprocket but Total Commander / Wincommander / Norton Commander are hardly obscure...
They are what the Gnome Midnight Commander was cloned from. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 11:43 am Post subject: |
|
|
adaptr wrote: | Erm... hate to rock your sprocket but Total Commander / Wincommander / Norton Commander are hardly obscure...
They are what the Gnome Midnight Commander was cloned from. |
so? |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 11:49 am Post subject: |
|
|
I emerged krename and it looks very promising. I think that'll do. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 11:53 am Post subject: |
|
|
Sujao wrote: | adaptr wrote: | Erm... hate to rock your sprocket but Total Commander / Wincommander / Norton Commander are hardly obscure...
They are what the Gnome Midnight Commander was cloned from. |
so? |
Yes... that was in response to the previous post - but you outposted me _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Mon Dec 06, 2004 11:54 am Post subject: |
|
|
Sujao wrote: | actually the windows program has no syntax at all, since its a gui. |
What do you call "[N4-7] [N1-3]" then? How am I supposed to intuitively know what that does?
adaptr wrote: | Erm... hate to rock your sprocket but Total Commander / Wincommander / Norton Commander are hardly obscure...
They are what the Gnome Midnight Commander was cloned from. |
This thread was the first time I've ever heard of "total commander." I used DOS, Windows 3.1, 9x, NT derivatives, and lots of software for those OSs, but never once do I recall hearing anyone mention "total commander." |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 06, 2004 12:09 pm Post subject: |
|
|
Well... Windows Commander was the original Windows clone of the old Norton Commander, and that became Total Commander in the last major version upgrade (5 to 6). _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 12:11 pm Post subject: |
|
|
Jake wrote: | Sujao wrote: | actually the windows program has no syntax at all, since its a gui. |
What do you call "[N4-7] [N1-3]" then? How am I supposed to intuitively know what that does? |
Well its much easier then it seems. Moreover the gui is self explaining so you cant do much wrong. And there are only three letter at all I think (N, C and ?] [N4-7] means the filename from 4 to 7 char |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Mon Dec 06, 2004 12:13 pm Post subject: |
|
|
http://www.rmonet.com/commander/#linux
I found thi9s list of commander clones.. Maybe one of them has the same functionality
As mentioned before Krename also seems to be a good candidate:
http://www.krename.net/
Last edited by BlackEdder on Mon Dec 06, 2004 12:26 pm; edited 2 times in total |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Mon Dec 06, 2004 12:18 pm Post subject: |
|
|
BTW if none of them fit your needs then it would be quite easy to write a script that interprets your [N...] commands. Or better yet, learn regexps (they are POWERFULL) and write a script that copies/moves files based on the regexp you give it
Code: | myultrakewlrenametool "-" "$3 $1 $4" |
For a filename separated by "-" change order from $1 $2 $3 $4 to $3 $1 $4
(I suggets ruby as nicest script language )
EDIT Ops I think I just described what rename does |
|
Back to top |
|
|
Sujao l33t
Joined: 25 Sep 2004 Posts: 677 Location: Germany
|
Posted: Mon Dec 06, 2004 12:39 pm Post subject: |
|
|
I didnt know rename can handle regular expressions. At the moment I am using krename. It seems to be just what I was looking for although It would be nice to have some filemanager to have this functionality. |
|
Back to top |
|
|
|