09-18-2010, 12:34 PM #1
Drag and drop to overwrite? (a GUI version of the 'cp' command?)
- Member Since
- Sep 13, 2009
Imagine I have two files of the same type (e.g. mp3), each with different content and named differently. Sometimes I'd like to be able to overwrite file A with file B, but preserve the filename of A.
The most common scenario where this happens is with my mp3s in iTunes. For example, I'll have a song in my library at 128kbps called 'mySong.mp3'. Later I'll re-rip the song from the CD at 192kbps, but for whatever reason the file is named differently, e.g. 'mySongBetterQuality.mp3'.
I don't want to delete the original song and then reimport the better quality mp3, because I'll lose all my metadata (play count, lyrics, etc). Instead I trick iTunes by renaming 'mySongBetterQuality.mp3' to 'mySong.mp3' and then copying it into the directory where the old song is located, thus overwriting the old song. The next time I open the song in iTunes, it recognises the new kbps, but sees it as the same song in all other respects, so my metadata is preserved.
This is a nice little hack to use every now and then, but when you've reimported a whole album you have possibly 12 files to rename - it's rather tedious. So basically I'm trying to locate/create a better way of doing this.
One slightly quicker method is to use the 'cp' command in Terminal. I start off by typing 'cp ' at the prompt. I then drag and drop the source file into the terminal window, which results in the full filename being typed out for me. Next I type a space, then I drag the destination file into the Terminal. I end up with something like this:
> cp /Users/me/here/mySong.mp3 Users/me/there/mySongBetterQuality.mp3
The cool thing about cp is that if the destination filename already exists, it will simply overwrite it, which is exactly what I want.
Again, this is a nice little hack to use, but it's a bit tedious. What I *really* want is some kind of drag and drop method that has the same result. For example, I right-click and drag file B, drop it over file A, and I'm presented with an Overwrite option in the context menu.
Does anyone know how I could go about creating this? Could Automator help?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By quackagator in forum OS X - Operating SystemReplies: 1Last Post: 04-07-2014, 11:50 AM
By ekutzen in forum Switcher HangoutReplies: 2Last Post: 12-12-2012, 06:01 PM
By V6Pony in forum OS X - Development and DarwinReplies: 4Last Post: 06-29-2012, 10:49 AM
By simianwarthog in forum Apple NotebooksReplies: 2Last Post: 10-13-2010, 12:01 AM
By ceejay in forum Switcher HangoutReplies: 27Last Post: 09-04-2010, 11:18 PM