How do I merge files/folders

Discussion in 'Mac Basics and Help' started by zorg, May 5, 2006.

  1. macrumors regular

    Joined:
    May 3, 2006
    #1
    Hey, I'd like to know how to merge folder directories? Is there a way? I don't like the way os x replaces all contents in directories when you replace a folder... I want os x to merge the files.
     
  2. macrumors 603

    GimmeSlack12

    Joined:
    Apr 29, 2005
    Location:
    San Francisco
    #2
    Can't say I totally understand the question, but are you talking about moving all the files in one folder into another? The only way is to select all the files in one folder and move them into another. Moving a folder into another folder does nothing but move that folder.
     
  3. thread starter macrumors regular

    Joined:
    May 3, 2006
    #3
    Yeah, sorry I wasn't being clear.

    Ah, but is there a way to replace the "replace" function with a "merge" function of some what? Like. If I have a folder named "foo" and another named "foo1" with similiar and different files, can I merge them without doing all the "don't replace?" stuff..
     
  4. macrumors 68040

    motulist

    Joined:
    Dec 2, 2003
    #4
    I'm still not quite clear on what you're looking to do. How would you want it to merge the contents of 2 folders without asking you which ones you want to replace if two files have the same name? There is a replace all button, but I assume that's not what you mean.
     
  5. macrumors 603

    GimmeSlack12

    Joined:
    Apr 29, 2005
    Location:
    San Francisco
    #5
    Oh I think I get you now. I'm gonna say there isn't a way to do that. Merging is something that I've never really thought about though, so it might be I just don't know. But I don't know of anything in the OS that does that.
     
  6. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    You can do it via the Terminal.

    Say you have two folders:
    ~/Documents/f1
    ~/Documents/f2

    you can do this:

    cp -R -i ~/Documents/f1/* ~/Documents/f2

    This will copy all contents of f1 into f2 (asking per file if you want to overwrite and recursing down folders contained in f1).

    Once you are happy that this has worked you can delete folder f1.
     

Share This Page