Can CopyDirectory copy directories recursively whilst maintaining the directory structure at the destination?

Added by Ben Hymers over 8 years ago

I tried:

CopyDirectory target : dest : src : ** ;

... but that copied everything from the dest/ and all its subdirectories into src/, completely flat. Is there a way to do this other than by invoking Shell with a platform-specific command?


Replies (2)

RE: Can CopyDirectory copy directories recursively whilst maintaining the directory structure at the destination? - Added by Joshua Jensen over 8 years ago

That syntax of recursive globbing was not supported by the CopyDirectory rule, but I just pushed a change up that enables it.

Previously, you had to do this:

CopyDirectory target : dest : src : * : 1 ;   # Run recursively.

Now you can do what you specified above:

CopyDirectory target : dest : src : ** ;

Both continue to work, although I'll likely ditch the top syntax now.

Josh

(1-2/2)