Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Old 04-09-2004, 07:58 AM   #1
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
finder problem

Hi,

I would like to know how to avoid removing files within a folder that i would like to replace with another one.

Remark! Why does finder remove files that are not being replaced! I would like to see an ADD function in this situation...

TIA

Ronald
rozeel is offline   Reply With Quote
Old 04-09-2004, 08:10 AM   #2
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
I need clarification here..

You have a folder named 'Foo' in your Documents directory, with enclosed files named 'bar1', 'bar2', and 'bar3'.

You want to take another folder named 'Foo' and drag it into your Documents directory, and have it not overwrite the existing 'Foo' folder, only replace the duplicate files and leave the unique files alone?
yellow is offline   Reply With Quote
Old 04-09-2004, 08:13 AM   #3
macmath
MVP
 
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
I'm not sure what you mean. Is it:

You have a folder named SomeName which contains files, and you are dropping another folder also named SomeName into the folder which contains SomeName and you don't want those files in the original SomeName lost when the new SomeName replaces the old SomeName?

Are these two always the same two folders for you, or is this an issue with various pairs of folders in general? If this always involves the same two folders, I can picture an AppleScript which you could drop the new folder on and which would add the contents of the new folder to the old (with or without replacing files of the same name). If someone were really crafty, they might be able to write an AppleScript which finds a folder of the same name, but that person is not me. Is their any commonality between the files in the two folders?
macmath is offline   Reply With Quote
Old 04-09-2004, 08:14 AM   #4
macmath
MVP
 
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
Once again, yellow, I'm 3 minutes behind you!
macmath is offline   Reply With Quote
Old 04-09-2004, 08:17 AM   #5
DeltaMac
League Commissioner
 
Join Date: Jan 2002
Posts: 8,528
If you replace an existing folder, then all files within the folder are included...
easiest way to avoid this, is to open the new folder, select all files in that folder, and drag selected items to the old folder. Using this method will only replace same-named files and folders, and ADD folders and files that are new or a different name. If you don't want to replace ANYTHING in the old folder, then simply rename the old folder, and copy the new folder where you want it.
DeltaMac is offline   Reply With Quote
Old 04-09-2004, 08:19 AM   #6
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
If this is the case, it replaces the folder (blasting all contents) for the exact same reason it replaces the alike-named-files inside if you dragged them in by hand.
yellow is offline   Reply With Quote
Old 04-09-2004, 08:27 AM   #7
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
oh no tell me it

is not true..

even windows and linux/unix aren't deleting a folder and then copying. because thats the way it works.. i think..

so guess i'll have a folder with 100 folders in it.. and sub sub sub in it..

I would like to make an extra backup so a simple copy and replacing all the files that are in there.. So i am choosing to replace all existing files and not deleting the files that are not being replaced...

oh my god... what moron did program that piece....

Are there any good tools for this kind of situation because finder is in this kind not my friend!
rozeel is offline   Reply With Quote
Old 04-09-2004, 08:41 AM   #8
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
I'm still not entirely sure what you're asking for.

I'm sorry, I would say it's more uncommon to have an OS actually let you have multiple versions of the same directory/file in the same place. I cannot 'cp ~bar/foo ~/foo' without overwritting the foo in my directory. The Finder is just the User Interface, it's not an incremental backup software or file sync. More ofthen then not, when people drag folders & files from point A to point B and there's already an existing file there, they want to be told and they have the choice to either overwrite the existing or not. I wouldn't want to go through the rigamarole of trying to decide what to replace in an .app when I dragged a new one in.
yellow is offline   Reply With Quote
Old 04-09-2004, 09:08 AM   #9
macmath
MVP
 
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
Quote:
Originally Posted by rozeel
I would like to make an extra backup so a simple copy and replacing all the files that are in there.. So i am choosing to replace all existing files and not deleting the files that are not being replaced...

Is your question relating to making backups? If so, then there are plenty of backup utilities out there which can discern which files have changed since last time (and therefore only touch replace the changed files while leaving the unchanged alone).

Do a search here on 'backup' and related terms (backup and incremental) and you'll find information on this kind of software.

Last edited by macmath; 04-09-2004 at 09:14 AM. Reason: Clean up a little.
macmath is offline   Reply With Quote
Old 04-09-2004, 09:31 AM   #10
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
Unhappy well let me explain

I have on an osx machine on an external firewire drive (250Gb)

I have a map called backup

in that map i have a subfolder for every days files..

e.g.

/backup/01-monday
/backup/02-tuesday
etc..
In every day folder i have folders called documents, date and misc

with in these folders e.g. documents i have version-folders

Well sometimes i would like to do an simple cut and paste off folders.. (also not possible ) But nevertheless it would be a help not reminding me which folders i already backup-ed but simple do an copy off all the folders.

I know that there are backup programms... you would not expect when you copy a folder with subfolders that it will result in an first i remove it and the copy... i would only replace those files that already exists..

Last edited by rozeel; 04-09-2004 at 09:33 AM.
rozeel is offline   Reply With Quote
Old 04-09-2004, 09:41 AM   #11
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
the ditto command might service you. search for it.
mervTormel is offline   Reply With Quote
Old 04-09-2004, 09:46 AM   #12
macmath
MVP
 
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,497
Quote:
Originally Posted by rozeel
I know that there are backup programms... you would not expect when you copy a folder with subfolders that it will result in an first i remove it and the copy... i would only replace those files that already exists..

Actually, this is the only behavior I've seen in a stock OS. It would be nice to have that capability (if I understand what you are asking) but that capability is provided by 3rd-party applications. The old "SpeedDoubler" by Connectix provided this capability in OS 8 and 9, but neither SpeedDoubler nor Connectix exists any longer. That is, SpeedDoubler would let you throw a bunch of files in and then only copy those which had changed.

Why not use a 3rd-party software solution? Many of these backup programs are free. Many here will recommend more sophisticated options which are better for more complicated cases, but I use Synk because it has some nice options, I know it preserves resource forks, I can automate it with cron, it is free, and it is easy to use. [Some use psync or rsync, but I don't have the time to read about them and set them up.] Synk will not replace files which have not changed since last time, it will replace files which have changed since last time, and it will (at your discretion) either delete files that are no longer in the source destination or it will move these files into a designated archive folder, listed by date. Thus, you can go through occasionally and decide if something is no longer in source by accident or if it can really be trashed. [Otherwise, if you've accidentally trashed a file and your backup utility has already run (from cron) then your copy in the backup is gone too. Naturally, this is not a problem if you have the resources to keep additional older backups on hand.]
macmath is offline   Reply With Quote
Old 04-09-2004, 11:19 AM   #13
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by rozeel
you would not expect when you copy a folder with subfolders that it will result in an first i remove it and the copy... i would only replace those files that already exists..

As macmath has said, this behaviour is standard for all OSes (e.g. Windows, Linux, OS X). I.e. when you drag a folder onto a destination, it replaces any folder of the same name that is there.
I think what you want is a merge operation instead of a replace. Again, as others have said, this is available via third-party utilities.
hayne is offline   Reply With Quote
Old 04-09-2004, 11:30 AM   #14
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
Nope is not for all OS's

Thats not true. On OSX a copy to a folder with the same name is an REPLACE on unix/linux/windows it a merge.

What i would like to see is that when you copy a folder within finder to another already existing foler it should merge.

Well finder gives an message "Would you like to replace the things in the already existing folder"..

My opion is now this is SHOULD be "I will first delete the folder and then copy it to the folder of the same name". Thats a BIG difference!
rozeel is offline   Reply With Quote
Old 04-09-2004, 11:36 AM   #15
cudaboy_71
All Star
 
Join Date: Jan 2002
Location: sacramento, ca
Posts: 874
i've been using switchback for many years to create a backup of a shuttle drive and it has never burned me. a very simple sync/backup util. just set up a 'source' and 'destination' and it does the rest.
cudaboy_71 is offline   Reply With Quote
Old 04-09-2004, 11:54 AM   #16
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
Quote:
Originally Posted by rozeel
Thats not true. On OSX a copy to a folder with the same name is an REPLACE on unix/linux/windows it a merge.!

Wow. Well, I decided to try this in Win2K. I created a folder on the Desktop and put some word docs in it and created a folder named the same thing in My Documents with some differently named word docs. Then I dragged the folder from the Desktop to My Documents and was notified that files would be replaced (see attachment). I clicked Yes and the folders/files were merged. Merged! Imagine that!
Nice behavior, Billy. That being said:

MAC OS X IS NOT WINDOWS

This behavior has never been a native thing in any Mac OS. I guess we longtime (or exclusive) Mac users just take this for granted. So if you're a switcher, this is one thing that you will have to get used to being different and find a 3rd party application to do what you want.

Last edited by yellow; 04-09-2004 at 12:03 PM.
yellow is offline   Reply With Quote
Old 04-09-2004, 01:45 PM   #17
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
okay

As an long time user of many os-es like windows (i am not a Bill Lover), OS/2 Unix (SCO/Linux) and even DOS.

I am a mac user for almost 6 months, and am still a fan of this os and hardware. But this thing makes me think. What the heck is this? What kind of user UNfriendly way of saying : use another program do do this thing...

Must i write an rsync script for such a tiny thing.

Come on.. this function must be one of the basics...

Its hard to believe that this is not in the way is SHOULD be used..

Well let me say that in an terminal session it works like it should accept in the GUI. Ha what a joke!

Too bad, but still i think a Mac is an beautiful thingy!
rozeel is offline   Reply With Quote
Old 04-09-2004, 02:06 PM   #18
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
Quote:
Originally Posted by rozeel
What the heck is this? What kind of user UNfriendly way of saying : use another program do do this thing...

While I agree that this is a nice functionality that it would be nice to have built into the OS. Though I'm not aware of one, there is probably an app that you can run out there that will make your Mac behave like you want it to.

One of the things about Windows is that Microsoft tries to be REALLY helpful with most of it's apps and OS. It shoehorns tons of bells and whistles into the OS to try and make it extremely "user friendly" and configureable. But at some point it crosses the line of helpful and marches uncaringly into the realm of 'bloat-ware'. Something OS X hasn't done (yet). Apple leaves plenty of opportunity for 3rd party developers to create nice apps to enhance OS X. If these apps turn out to be really popular, it'll probably be a few years before Apple buys/steals it. Microsoft has been buying/stealing ideas for years, and years (and years, and years), so it'll take Apple a while to catch up.

Last edited by yellow; 04-09-2004 at 02:08 PM.
yellow is offline   Reply With Quote
Old 04-09-2004, 02:24 PM   #19
rozeel
Prospect
 
Join Date: Mar 2004
Posts: 46
well ok

Lets be aware to not end in an endless discussion

But i think (regardless of this was also the way mac deals with it) that an copy action results in overwriting existing files/folders but not totally wipe out the entire folder.

If that is the case then be consistent and use the same behaviour in an terminal session... Copying an existing folder should have the same behaviour. But then again is has been an merge for ages alsi in *nix (regardless of what King Bill does)
rozeel is offline   Reply With Quote
Old 04-09-2004, 06:10 PM   #20
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by rozeel
in an terminal session it works like it should accept in the GUI. Ha what a joke!

I am having trouble understanding what you are referring to since the 'cp' command definitely does not do a merge. Nor does the 'mv' command. Please give a concrete example.
hayne is offline   Reply With Quote
Reply


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

Forum Jump



All times are GMT -5. The time now is 08:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.