LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-14-2010, 04:37 AM   #1
Tom6
Member
 
Registered: May 2009
Posts: 116

Rep: Reputation: 16
bulk file re-name


Hi

I have tried a few of these but can't remember any names. I'm using a LiveCd session at work so can't access my normal notes lol.

Actually this time i hope to find something a little different because i want to edit the files by hand rather than thru search&replace. For a joomla website i have to rename all the uploaded files to remove the spaces between words and change the first letter of each word to UpperCase.

So i really want to convert all existing filenames to CamelCase to make them easier to read

Thanks and regards from
Tom
 
Old 07-14-2010, 06:54 AM   #2
jayfree
Member
 
Registered: Oct 2009
Location: NJ
Distribution: fedora 20 and rawhide
Posts: 47

Rep: Reputation: 8
this looks like a good start http://ubuntuforums.org/showthread.php?t=1222467
 
1 members found this post helpful.
Old 07-14-2010, 07:08 AM   #3
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Hi

I am a bit nervous of using bash-scripts and would rather use a gui program to do this. Thanks for the excellent link tho. Looks like something worth exploring when i get time later.

Regards from
Tom
 
Old 07-14-2010, 07:35 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
<duplicate post of mine..>
 
Old 07-14-2010, 07:35 AM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
For something such as batch-renaming a bunch of files, I believe that a GUI tool, if one exists, would provide no advantage over a few lines of bash-script to accomplish the task. Perhaps I am even being generous when I say "a few lines", because this could be done in literally only a few lines at most.

Nothing to be nervous about, you just need to learn some very basic scripting, and that is something that will definitely come in handy on more than one occasion.

If you create an empty folder in your home directory or wherever (just not as root) and make some dummy files in there to test the code on, you'll likely be able to come up with a working solution in relatively short order, probably faster overall than it would have taken to find & install a GUI tool and learn how to use it. Plus, all of the code you require for this task can be found in myriad snippets of code all around LQ, particularly in the programming forum, since tonnes of folks over the years have done the same thing-- batch renaming a whack of files.

Best regards, whichever way you go.

Sasha
 
Old 07-14-2010, 08:39 AM   #6
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Hi

I seem to remember something like pyrenamer or something like that? At work they already see me learning css scripting and i am going to have to ask if i can learn java at work, i really don't think they would be happy to see me learning something else on their clock. I was just hoping for something so that they could see results today.

Regards from
Tom
 
Old 07-14-2010, 08:56 AM   #7
mecelec415
Member
 
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183
Blog Entries: 2

Rep: Reputation: 23
what about krename?
or gwenrename
 
1 members found this post helpful.
Old 07-14-2010, 10:35 AM   #8
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Thanks, they are kde apps aren't they? Anything for the gnome DE used in the normal Ubuntu LiveCd? Sorry i am being fussy but i would rather use an app i can use without crashing the system. The machine only has 750Mb ram so i can't install KDE along with the Gnome.
Regards from
Tom

Last edited by Tom6; 07-14-2010 at 10:37 AM.
 
Old 07-14-2010, 11:40 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Tom6 View Post
Hi

I am a bit nervous of using bash-scripts and would rather use a gui program to do this. Thanks for the excellent link tho. Looks like something worth exploring when i get time later.

Regards from
Tom
with all due respect, the terminal (AKA command-line, shell, etc.) is often the best and safest way of doing something.

In this case, look at the "rename" command. If it is not already installed, it should be available using your package manager.

BUT: Don't attempt to install SW when running from LiveCD
 
Old 07-14-2010, 04:42 PM   #10
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Please, are sensible suggestions possible?
 
Old 07-14-2010, 04:50 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Tom6 View Post
Please, are sensible suggestions possible?
Would you mind telling us exactly which points were not sensible, and--if its not obvious--in which post(s)?

You will find that most people here give serious answers.

Last edited by pixellany; 07-14-2010 at 04:51 PM.
 
Old 07-14-2010, 05:08 PM   #12
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Both 'answers' from pixellany have really lowered the bar in this thread. The answers from everyone else did give something useful with clear explanations, even tho those weren't exactly what i was looking for they were clear and helpful.
 
Old 07-14-2010, 05:36 PM   #13
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
lowering the bar a little further

Quote:
Originally Posted by Tom6 View Post
Both 'answers' from pixellany have really lowered the bar in this thread. The answers from everyone else did give something useful with clear explanations, even tho those weren't exactly what i was looking for they were clear and helpful.
Hi,

pixellany was merely pointing out that using the CLI has many advantages instead of relying on GUI apps, e. g. CLI commands are as 'lightweight as it gets' and most of them have been there for a long time, are well tested and therefor very robust. Especially in this case they are a very good choice, since you will also have to deal with reg. expressions when you are using a GUI tool. I know that CLI can be intimidating at first. But it's really not that bad, once you get to know it.

For what it's worth, open synaptic and search for the following
purrr
pyRenamer
gnome commander

The latter might be a bit of an overkill though.
 
1 members found this post helpful.
Old 07-14-2010, 09:01 PM   #14
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Tom6 View Post
Both 'answers' from pixellany have really lowered the bar in this thread. The answers from everyone else did give something useful with clear explanations, even tho those weren't exactly what i was looking for they were clear and helpful.
Tom6;
I hate to quibble, but I asked you to identify specifically what answers were not sensible. My interpretation of "sensible" is something which is both correct, and which fits the situation at hand.

Please do me the courtesy of explaining what was incorrect about my suggestions and why they were "lowering the bar".

I have a pretty thick skin and---unless you indulge in egregious violations of the LQ rules---I will continue to help you "no matter what". Other members--once told they are "lowering the bar"--will never again lift a finger for you......
 
Old 07-15-2010, 06:50 AM   #15
Tom6
Member
 
Registered: May 2009
Posts: 116

Original Poster
Rep: Reputation: 16
Hi

GrapefruiTgirl had already suggested a good gui approach and even provided links so i could check her statements via another source which expanded on her relatively brief answer (brief is usually good). I rejected the cli approach and gave my reasons. Mecelec then gave a couple of excellent gui tools but it's difficult to guess which DE people are using unless you happen to know the particular distro or variant. Jayfree had given an excellent initial response by pointing me to a similar thread which i hadn't already found. But neither of pixellany's response added anything that hadn't already been given. At best it only supported GrapefruiTgirl's response and added a somewhat cryptic comment "Don't attempt to install SW when running from LiveCD" although SW doesn't appear to have been mentioned earlier and the answer doesn't let us know what SW is. As we have seen from the next post there were a number of other gui answers that would have been more appropriate. It is very kind to try to help but if you don't know an answer that adds something positive then there is no point in trying to answer unless it is to point them to elsewhere. Also giving an answer that may alienate the person asking is not good practice. Many people don't like the command-line and as we saw there was no need to try to force me onto it. Often we hear people reject linux because it is "all old and geeky" and promoting that FUD is not good practice unless we want to restrict gnu&linux usage. Crts was quick to jump to your defence but also added some very useful packages to try.

Regards from
Tom

Last edited by Tom6; 07-15-2010 at 07:00 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk music file convert? spoovy Linux - Newbie 9 04-04-2010 02:12 PM
Batch File for format? Bulk Formatting Beebe Solaris / OpenSolaris 2 04-12-2005 05:07 AM
convertion from doc file to pdf in bulk sujith_deva General 6 12-09-2004 11:20 PM
Bulk File Renaming nevereverend Linux - Newbie 11 07-03-2004 05:28 PM
Bulk Permission linuxfond Linux - Newbie 15 06-22-2003 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration