format problem
OK so hears is the problem i have about 20 gigs of music all on m4a (itunes don't ask why) and i want to convert them all to mp3 now i have established that by using the following command
for i in *.m4a do base=`basename "$i" .m4a` faad -o - "$i" | lame -h -b 192 - "$base.mp3" done ; rm *m4a that will convert every m4a in that directory to mp3 now is there a way to alter that command so that it will search through the directory's and the directory's within those directory's and convert all the tracks contained within them. |
Hi!
don't Code:
for i in */*.m4a Code:
for i in */*/*.m4a Regards |
hi it almost works it finds and converts the files ok but it converts them all to the directory i issue the command from and not to the directorys they came from. thanks for your help have you got any other ideas ?
|
Hi!
yes you're right. Take a look at "basename --help". It looks like it removes any directory name. I think you should make a list of directories, visit them one after the other and once there process the files inside. This command should be helpful: Code:
find -type d So this Code:
for i in `find -type d` Regards |
still not working :( ive tried playing with this a little bit but got no where. it does convert the files to some sort of mp3 but there not readable and there only a few KB's. for some reason it asks for permission to remove the orginal m4a's this time where as it didnt before hears the code
Code:
chris@home2-linux:~/Desktop$ for i in Alter_Bridge/One_Day_Remains/ |
All times are GMT -5. The time now is 06:04 PM. |