MBP ate my data when copying folder?

Discussion in 'MacBook Pro' started by deadkennedy, Jul 2, 2010.

  1. deadkennedy macrumors 6502

    Joined:
    May 22, 2010
    #1
    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.
     
  2. advres Guest

    advres

    Joined:
    Oct 3, 2003
    Location:
    Boston
    #2
    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.
     
  3. RossMc macrumors 65816

    RossMc

    Joined:
    Apr 30, 2010
    Location:
    Newcastle, UK
    #3
    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.
     
  4. advres Guest

    advres

    Joined:
    Oct 3, 2003
    Location:
    Boston
    #4
    I believe he copied the whole folder, not the contents.
     
  5. RossMc macrumors 65816

    RossMc

    Joined:
    Apr 30, 2010
    Location:
    Newcastle, UK
  6. deadkennedy thread starter macrumors 6502

    Joined:
    May 22, 2010
    #6
    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?
     
  7. RossMc macrumors 65816

    RossMc

    Joined:
    Apr 30, 2010
    Location:
    Newcastle, UK
    #7
    Windows does exactly the same thing when you are copying a folder it warns you about overwriting it.

    Download Mackeeper Trail and use the undelete function it might find the files you lost.

    http://mackeeper.zeobit.com/
     
  8. aljlin macrumors regular

    Joined:
    Sep 7, 2006
    Location:
    CA
    #8
    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...
     
  9. deadkennedy thread starter macrumors 6502

    Joined:
    May 22, 2010
    #9
    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.
     
  10. mikerr macrumors regular

    Joined:
    May 5, 2007
    #10
    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:
     
  11. deadkennedy thread starter macrumors 6502

    Joined:
    May 22, 2010
    #11
    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.
     

Share This Page