Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

deadkennedy

macrumors 6502
Original poster
May 22, 2010
320
0
I'm a new mac user coming from Windows. I was copying a folder called Projects from my external drive to my MBP over the existing Projects folder thinking contents will be added to the existing content. However it seems that the old contents were deleted and new ones added. Is this how Mac OS operates? Is there a possibility to recover all this lost data? It's really annoying and it seems like a bug.
 
You overwrote the other folder. Maybe before doing something potentially disastrous like overwriting important things you would find out how the system handles such things?

This is the way it works and it isn't a bug. The finder even warns you when you try to do something like this and you need to hit OK.
 
If the files you where copying over where different names to the ones already in the folder then no it shouldn't have replaced the old ones.
 
Oh, OP did you not get this message?

Screenshot2010-07-02at220016.jpg
 
Thanks for immediate replies. Yes, I did get that warning, and I wasn't copying just the contents but entire folder. I didn't know it works like that I was expecting a Windows like behaviour. Is there a chance I recover the files?
 
if you have time machine setup and it backed up the files, you might be able to restore the file from previous version using that...
 
Mac Keeper didn't help and I didn't have the Time Machine on. Windows does not work in the same way, if you copy folder over another folder with the same name it will keep the contents intact apart from files that are on the same path and with the same name. In this case it will overwrite the files, otherwise it will append.

This is a serious flaw of how Mac works especially when dealing with hierarchically complex folder structures and you want to do append-copy. I see I'll need to do a bash script in such cases, but luckily Mac has a great Terminal at least.
 
This IMO is one of the worst most unintuitive features of OS X

Many people have lost data to it too, myself included.

Funny how it doesn't get much press :rolleyes:
 
To avoid any such surprises on the future I'm switching to terminal where I feel at home :)

Even cp command works more like in Windows so why the heck can't you visually achieve this?

cp -rf somelocation/somedir/* somedir

takes all the contents of somelocation/somedir be it directories or files, and appends it into somedir. It does not delete the content already there in somedir even if directory names are same on the inner paths . I hope this helps someone.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.