New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Drag and drop to overwrite? (a GUI version of the 'cp' command?)

Post Reply New Thread Subscribe

Thread Tools
Disco Patrick

Member Since: Sep 13, 2009
Posts: 1
Disco Patrick is on a distinguished road

Disco Patrick is offline
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?
QUOTE Thanks

Post Reply New Thread Subscribe

« iCal colors | OSX 10.4 Installation »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Help me with drag and drop ceejay Switcher Hangout 27 09-04-2010 11:18 PM
Trackpad drag and drop woes Switcher Hangout 20 05-15-2010 04:56 PM
drag and drop multiple folder chris watson Music, Audio, and Podcasting 2 03-23-2009 11:22 AM
Firefox users: extension that allows you to drag 'n' drop to upload remain OS X - Apps and Games 4 06-18-2007 12:16 AM

All times are GMT -4. The time now is 01:05 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?