How can i bulk rename music files in reverse order from artist - song name to songname - artist

How can I bulk rename music files in reverse order from artist - song name to songname - artist.
I actually dont need to rename the actual files.
Its just i have a huge txt list of 100,000 music names that are listed as so..
Artist - Song Name
Artist - Song Name
Artist - Song Name
Artist - Song Name
Artist - Song Name
Artist - Song Name
and i need this list to reverse it self so it is listed in the list as
Song Name - Artist
Song Name - Artist
Song Name - Artist
Song Name - Artist
Song Name - Artist
Song Name - Artist
Song Name - Artist
Im sure there is some kinda way to auto a mix of applescript/automator/terminal to do something like:  all char before the "-" replace with the chars after the "-".
Please some one help me if you know how I can pull this off

How can I bulk rename music files in reverse order from artist - song name to songname - artist.
I actually dont need to rename the actual files.
Its just i have a huge txt list of 100,000 music names that are listed as so.
I wonder if we haven't misunderstood what you were asking for. Could it be that you have not a huge file, but just a huge list of names in many small files. If that's the case, you should rather use the following script instead of the previous one.
Since this script does not rename the files, make a backup of your files before running it.
set theFolder to choose folder -- the folder containing your text files
tell application "Finder"
    set theNames to name of files of theFolder whose name extension is "txt"
end tell
set theTextFiles to {}
set theFolderPath to POSIX path of theFolder
repeat with thisName in theNames
    copy theFolderPath & thisName to the end of theTextFiles
end repeat
repeat with thisFile in theTextFiles
    set F1 to open for access thisFile
    set theText to read F1
    close access F1
    set theParagraphs to paragraphs of theText
    set bigList to (a reference to theParagraphs)
    set theNewParagraphs to {}
    set bigNewList to (a reference to theNewParagraphs)
    repeat with X in bigList
        set P to offset of " - " in X
        if P = 0 then
            set Y to X
        else
            set Y to text (P + 3) through -1 of X & " - " & text 1 through (P - 1) of X
        end if
        copy Y & return to the end of bigNewList
    end repeat
    set theNewText to text 1 through -2 of (bigNewList as text)
    set F2 to open for access thisFile with write permission
    set eof F2 to 0
    write theNewText to F2
    close access F2
end repeat
display dialog "Done!" buttons {"OK"} default button 1 with icon 1
Message was edited by: Pierre L.

Similar Messages

  • Hello! I have one iTunes library on my iPod and one iTunes library on my computer. When I connect my iPod touch to my PC, however, I cannot find any files in my iPod except for pictures. How can I find the music files so I can add them to my iTunes?

    Hello! I have one iTunes library on my iPod and one iTunes library on my computer. When I connect my iPod touch to my PC, however, I cannot find any files in my iPod except for pictures. How can I find the music files so I can add them to my iTunes?

    You can't do that.
    And before you decide to store any music that you own on a computer at work, talk to your IT department. Many organizations do not permit it for legal reasons. Standard policies are that anything stored on company owned computers is the property of the company. It could not be legally stored on their machines unless you transfer the licenses and all copies, physical and digital, to the company, meaning you no longer own the music. If they were to be audited and could not prove that they own the music, they would be subject to copyright violation penalties. Just use your iPod when you're at the office if you want to listen to music.

  • How can I store my music files on an external hard drive and listen to them through iTunes that way?

    How can I store my music files on an external hard drive and listen to them through iTunes that way? At the moment they're both on the external hard drive and also stored on the computer but I'm quickly running out of memory on my iBook G4 so I'd like to only keep them on the external hard drive and, if possible, delete them from my computer's hard drive. At the moment, when the hard drive isn't plugged in a lot of the files won't play and I get the exclamation mark next to the particular song in iTunes, but everything plays fine when the hard drive is plugged in.
    Thank you.

    Sounds like your files are playing from the external drive already.  To check go to iTunes - Preferences - Advanced and check the Media Folder Location.  Change it to the external drive if you need to.

  • How can I copy my music files to my iPAD. The CDs are currently stored in folders on my PC. Note: Synching via iCLOUD won't work because I have VISTA OS and I need at least Windows 7 or 8.

    How can I copy my music files to my iPAD. The CDs are currently stored in folders on my PC. Note: Synching via iCLOUD won't work because I have VISTA OS and I need at least Windows 7 or 8.

    Hi ladextr,
    Thanks for using Apple Support Communities.  To sync your music to your iPad, first put your music in iTunes as described here:
    Adding music and other content to iTunes
    http://support.apple.com/kb/ht1473
    Adding content on your computer to iTunes
    iTunes helps you add digital audio and video files on your computer directly to your iTunes library. You can add audio files that are in AAC, MP3, WAV, AIFF, Apple Lossless, or Audible.com (.aa) format. If you have unprotected WMA content, iTunes for Windows can convert these files to one of these formats. You can also add video content in QuickTime or MPEG-4 format to iTunes. To learn how to add these files to iTunes follow the steps below.
    Open iTunes
    From the File menu, choose one of the following choices:
    MacAdd to Library
    Windows
    Add File to Library
    Add Folder to Library
    Navigate to and select the file or folder that you want to add
    If iTunes is set to "Copy files to the iTunes Music folder when adding to library," iTunes will copy all content that is added to the iTunes library to the iTunes Music folder. To adjust this setting or change the location of this folder, go to the Advanced tab in iTunes Preferences.
    Once that's done, you can sync the music to your iPad by following this article:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/ph12313
    Cheers,
    - Ari

  • How can i copy the music files from itunes in mp3 format to my PC

    How can i copy the music files from itunes in mp3 format to my PC

    Dr. P,
    Song files are just files.  You can copy them the way you copy any other files, like photos or documents.
    If any of the files are not already in MP3 format, and you wish to create MP3 versions, then you can convert them using iTunes, by following this guide:  http://support.apple.com/kb/HT1550

  • My hard drive failed so I sent it off to get recovered. How can I get my music back that I purchased from my old iTunes account?

    My hard drive failed so I sent it off to get recovered. How can I get my music back that I purchased from my old iTunes account?

    See Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How can i get mp3 music in a sd card from itunes

    how can i get mp3 music in a sd card from itunes

    This section is for Apple TV, I would post in the iTunes forum.

  • How can i import a music CD including all sounds from 5Hz to 30KHz?

    In order to be really lossless what configuration must be used?

    +"how can i import a music CD including all sounds from 5Hz to 30KHz?"+
    +"In order to be really lossless what configuration must be used?"+
    That is two different questions. If you want "lossless," which is defined as being sonically equivalent to the source CD, iTunes has 3 choices, as thicks noted.
    However, that does not provide frequency content as high as 30 kHz, since normal CD encoding is based on 44/16 PCM, and rolls off well before that. If you want all those frequencies, you have to use studio quality masters based on 192/24 encoding, which is far beyond iTunes's capabilities to handle.

  • I recently purchased an IPOD NANO 6th gen. I have a large library of music on my PC (non MAC). How can I sync my music files from my PC to my IPOD NANO?

    I recently purchased an IPOD NANO 6th gen. I have a large library of music on my PC (NON MAC). How can I sync my music library from my PC to my IPOD NANO. I use Windows Media Player to hod my music files.

    Install iTunes and import the Windows Media Player library to it.
    (63922)

  • How can I delete a music file directly from iPhone? Or not possible?

    Can I delete a music file directly from iPhone?

    Not possible.
    Either unselect it during what it syncs, or manually manage > delete song.

  • How can i transfer my music files from iPad 2 to MacBook Pro?

    hello,
    I got my mp3 files from PC and transfer to iPad 2. it works good.
    And I want to transfer this mp3 files from iPad to MacBook Pro.
    I don't know how to do it and it seems like I should 'buy some tranfer program from other website'.
    Should it word that way? or iTunes program can't deal this issue?
    I have changed some music file information (such as Album, Artist, etc) of mp3 files in iPad from iTune in MacBook. Of course, the iPad was connected to the MacBook. However after I disconnected the iPad from the Mac, those changes were not shown in the iPad (edited album name, artist name...). When I connect the iPad to the Mac again, I can see the changes in iTune in the Mac.
    Another issue.
    Does Anybody know how to set calendar from Japanese calendar to Gregorian calendar in iPad 2? When I setup the iPad first time, I might choose wrong calendar but I can't change/see the calendar option from iPad settings...
    I have been used PC for 20 years but to transfer myself to Apple, it's not easy....
    Issue 1 - music file transfer from iPad 2 to MacBook Pro
    Issue 2 - music file info udate in iPad 2 through MacBook and it doen's implied after disconnected.
    Issue 3 - Change calendar from Japanese to Gregorian in iPad 2
    Please advise,
    Have a great day!!
    Brandon

    A free app that can deal with music files is Songbird.
    There are two paid apps that can transfer just about any type of file; TouchCopy and PhoneView

  • How can I move the music files back into my itunes library?

    Hi. I hope you can help. We bought a new computer and I was using my iPod as an external drive to move the music from one to another. This did not work, it said it ran out of room even though there was room on it...Anyway when i returned to my iTunes page the music was no longer in the library. When i check the files on my computer it is still there, yet it is not in the library. How can I get it back there? Whenever I plug in my iPod now it tries to sync it with the library which would wipe away all of the music.
    Thanks

    +"When i check the files on my computer it is still there, yet it is not in the library."+
    Putting the files on your computer does not cause them to be added to the library. To add them, use the command File > Add Folder to Library, and point it to My Music or whatever folder(s) all the music is in.

  • How can I import my music files from my other computer

    I got a a new laptop, and I would like to import the music files from my older PC.
    How can I do this?
    Best regards.

    Click here and pick an option.
    (84784)

  • How can I delete all music files from my iPhone and start again?

    I rebuilt my iTunes library. I was under the impression that the first post-rebuild sync would erase all media from my iPhone.
    Under the Summary tab in iTunes, I checked Sync only checked songs and videos, and in my music list all songs are unchecked.
    Under the Music tab in iTunes, I checked Sync Music, and because all my songs are unchecked it shows 0 songs.
    However, after syncing, the status bar at the bottom of the Music tab still shows all my songs previously loaded as taking up memory, and when I open the Music app on my iPhone all those songs are still listed (although they are not playable).
    How can I clear everything out and start from scratch?

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    iPhoto for iOS (iPad): Delete photos from iPhoto
    http://support.apple.com/kb/ph3137
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
    Delete Pictures from Your iPad
    http://www.dummies.com/how-to/content/delete-pictures-from-your-ipad.html
     Cheers, Tom

  • How can I get my music files back when they are no longer on the computer?

    So the problem I am having is that I cannot play songs on the playlist because "the file cannot be located" error.  I checked the iTunes media folder and they weren't there. I searched my whole computer and they still could not be found.
    The story behind the problem is that I pretty sure all the songs I am having troubles with were ones I purchased on my iPod Touch itself. Several months ago when I plugged my iPod into the computer so it could sync ( my iPod is old and can't connect to the WiFi anymore forcing me to buy songs on my computer again.) The songs purchased on my iPod showed up on my playlist on my computer but they had the "!" next to them and they were no longer on my iPod and when I tried to get them back on I got the "cannot be located" error. I then checked the iTunes music folder again and the only songs there were songs I purchased on my computer.
    I am extremely frustrated. When I go to the iTunes store under "Purchases" they all show up however there is no way for me to download them again onto my computer because the "download" button cannot be clicked on because I am assuming it thinks the songs are already on the computer, but I know they aren't. I tried organizing my songs option and that didn't do anything.
    Is there any way to download them again? Or at least tell the iTunes store that they aren't located on my computer anymore so I can download them again?
    If I lost hundreds of dollars of music because the iTunes software is a piece a ****...

    You might want to post this question to the iTunes Windows forum rather than the iPod forum - try iTunes for Windows
    Just a note of encouragement - I doubt very much you've lost your music - they remember what you've purchased forever and as long as the content is still on the iTunes store you should never loose anything (however sometimes content is removed from the store for various reasons and in that cause if you don't have a local copy on your iTunes library it is not recoverable - but that issue is relatively infrequent) - it's just a question of why iTunes won't let you download it again. good luck...

Maybe you are looking for

  • How do I stop explorer from opening pop ups while browsing with firefox as default.

    I just bought a new hp laptop with windows 7. The first thing I did was install firefox 3.6.12 set as default, then thunderbird. When I visit a website I get pop ups that open in windows explorer. I installed pop-up stopper free edition, but it didn'

  • Problem in f-110

    Hi Experts, In automatic payment after selecting proposal tab i selected start immediately and press enter, then its shows payment proposal has not been carried out. this problem in development server and  in quality server where i can able to do tha

  • Iwant to create Report using master data

    i have created master data characteristic with attributes,is there is possible to create the info provider with the characteristic and attributes with transaction data and i want to create report in that cube.

  • Oracle WebService Management / Gateway doubts ?...

    hi all, i have some doubts with OWSM. i created one sample gateway called Gateway_test. While creating it in component url i have given http://172.28.10.71:8888/gateway 1) While specifying this URL, Can i use any port number..? After that, i register

  • Upgrading to Lightroom 5 after a clean install removed my Lightroom 3

    Hi, I recently had to do a fresh install of Mavericks on my Mac to eliminate some corrupted files.  After the install of the new OS, I am not able to restore applications from my TimeMachine backups.  I previously had Lightroom 3 installed, but I ins