View Single Post
  #1  
Old 06-22-2004, 07:59 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,357
Send a message via AIM to dnanian
When I try to copy a single directory, I end up copying the whole disk. Why?

This trips me up all the time, though I rarely get the question in support. But, since I'm asking...

Let's say you wanted to copy all user's Documents directories from the source to the destination. To do so, you might try just adding one command:

(copy) Users/*/Documents

But, when you run this, all files are copied. What's going on?

By default, an "empty" copy script copies all files from the source to the destination. So, adding a single command to just copy a directory (or group of directories, as above) is vaguely redundant: it's doing that already.

To resolve the issue, you first have to tell SuperDuper! to not copy everything, and then tell it what you want to copy. So, rather than one command, you'd have three:

(ignore) *
(ignore) .*
(copy) Users/*/Documents

That basically says to ignore (don't copy) all files, and then says "well, except you should copy Users/*/Documents!"

So, why two commands for the ignore -- with * and .*?

SuperDuper! uses Unix "globbing" rules to match wildcards like this. By definition, files that start with a period (.) are hidden, and don't match a wildcard. To ensure all regular and hidden files are ignored, you must specify both all files (*) and all hidden files (.*).

OK! Next question?
__________________
--Dave Nanian
Reply With Quote