LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2003, 09:26 AM   #1
Seraph
Member
 
Registered: Jun 2003
Distribution: SuSE 8.2 Pro
Posts: 42

Rep: Reputation: 15
Question changing file extentions


Hey, I was wondering if there was a command that could rename the file extensions of several files at once. What I'd like to do is be able to change all of the .mp3 files in a folder to .ogg. .for some reason grip is naming them wrong so it would be nice to be able to change all of the names at once.
 
Old 09-17-2003, 09:42 AM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
well you may risk having unplayable music files if you just rename an mp3 to an ogg...if it isn't an ogg file, then its still not going to be an ogg file just by changing and extention..you'll have to get some type of software to convert the files...
 
Old 09-17-2003, 12:31 PM   #3
Seraph
Member
 
Registered: Jun 2003
Distribution: SuSE 8.2 Pro
Posts: 42

Original Poster
Rep: Reputation: 15
Yeah, I know see I'm ripping the songs as .ogg files and they are actually .ogg files but for some reason grip is labling them as .mp3 which causes xmms to not play them. . and it gets old changing each file name one at a time. .
 
Old 09-17-2003, 03:42 PM   #4
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
From this search result:
http://mm.ilug-bom.org.in/pipermail/...23/001173.html

Copy and paste this on the command line:

for i in *.mp3; do j=`expr "$i" : "\(.*\).mp3"`.ogg; mv $i $j; done

good luck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
.sh extentions help! wisdom Linux - General 4 12-20-2004 07:02 PM
Counting matching file extentions variable Fegero Programming 1 11-17-2003 01:34 PM
frontpage 2003 file extentions bwarn Linux - Software 4 11-12-2003 09:00 AM
picking off file extentions in php antken Linux - General 3 08-14-2002 04:49 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 05:42 PM


All times are GMT -5. The time now is 04:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration