Find the answer to your Linux question:
Results 1 to 3 of 3
Hi there I am currently trying to maintain my music collection, and have come across a problem. The main collection is saved as high quality MP3's and FLAC and then ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    95

    Program to rename special characters


    Hi there

    I am currently trying to maintain my music collection, and have come across a problem. The main collection is saved as high quality MP3's and FLAC and then converted into small mp3s for my portable player.

    The conversion is done with SoundKonverter 1.2 which has an option to convert all special characters to _ or keep them as they are. It generates file names and folders based on ID3 tags rather than original file names. I then use diff and grip to find any files that converted with the wrong name, or into the wrong folder etc.

    The conversion is done with SoundKonverter 1.2 which has an option to convert all special characters to _
    However, I would like some special characters to become different things to _
    For example, I want to use a mapping similar to this

    /|\ and : become -
    < and > become ( and )
    becomes ' (or is it the other way around)
    * becomes _
    ? is removed

    I have seen a few basic scripts online that can remove special characters but none that offer different mappings like this, and I do not know how to edit them to do what I need. Is there a program that could do this? Its important that any method can see recursive or subdirectories as my music is stored as /music/filetype/artist/album/SONGS.XXX

    Currently running Suse11.4 with KDE4.6

    Any help appreciated
    Jonny

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Let me introduce you to my friend sed and the magical world of regular expressions. Sed - An Introduction and Tutorial
    linux user # 503963

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    just a note - watch out for those (, ), and " characters. They will probably have to be escaped. In fact, if I were you, I'd dump quotes in file names altogether.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •