Douglas N. Arnold [[EMAIL PROTECTED]] writes:
> But of course this fails because rsync excludes dir1 before getting
> to dir1/file2. So first I have to extend ToTransfer to contain the
> names of all parent (and grandparent...) directories:
(...)
> My question is, is there any easier way that doesn't require this step?
One possibility is to include "*/" in your include list (either in the
include file or just with an extra --include option on the command
line). The trailing "/" will only match directories, so this will
automatically include all directories along the way (from within which
then your exclude * will exclude everything but the files you have
listed).
It's possible that this will create empty directories for the tree
even if no files are transferred in that directory (I'm not positive).
-- David
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: [EMAIL PROTECTED] /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/