[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [MISC] mp3 fra audio-cd



Henrik Christian Grove wrote:

> > Divinorum_Isms_06_can_you_hear.mp3
> > - men det, jeg søger, er
> > Divinorum_Isms_06_CanYouHear.mp3
> >
> > Er der ikke en eller anden snedig perl-gut der lige kan stykke noget
> > sammen, der sletter mellemrum i filnavne og istedet gør det
> > efterfølgende bogstav stort?
> 
> Hvis alle spornumrene er tocifrede og du bruger en POSIX-kompatibel
> kommandofortolker (f.eks. zsh eller bash):
> 
> for i in *.mp3; do mv $i `echo $i | perl -ne 'split /(\d)/; $_[4] =~
> s/_(.)/\U\1/g; print $_[0].$_[1].$_[3]."_".$_[4].$_[5];'`; done

1000 1000000 tak - det var bare ikke helt det, jeg søgte - men det ser
ud til at du nemt kan rette det til... Problemet er, at det ikke er helt
generelt nok - retter ikke i album og artist men kun i titel (f.eks.
skal "Michael Jackson" også have fjernet et space).
Kan du ikke lave noget, der simpelt hen - som jeg skrev - fjerner alle
SPACES (ikke underscores) og gør efterfølgende bogstav stort?
Så skal filen selvfølgelig til at starte med hedde
"Divinorum_Isms_06_can you hear.mp3"
(med spaces istedet for underscores) - men DET kan man jo sagtens få
grip til.
Jeg kan nu godt se, at jeg skrev forkert - resultat-filnavnet bliver
ikke
Divinorum_Isms_06_CanYouHear.mp3 men derimod
Divinorum_Isms_06_canYouHear.mp3 (med småt c) - men det overlever jeg
nok.
Hvis den kan rekursere igennem subdirs vil det være suverænt - ellers
skal den bare omdøbde dem efter samme princip.
Så vidt jeg kan forestille mig vil dette være nemmere at lave end det,
du lavede.

Tak for hjælpen.

-Rune


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:28 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *