[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Could rsync do something like robocopy does?



On Mon, Jan 16, 2012 at 11:43:44AM +0000, TCP wrote:
> robocopy C:\CDs D:\Covers cover.jpg /s
> 
> This copy all avatar.jpg under C:\CDs to D:\Covers with respective
> directory name.
> 
> 
> Regards,
> Penguin
> 

Penguin,

I believe something like this might do what you describe (note this is untested!):
rsync --recursive --prune-empty-dirs --include '*/' --include cover.jpg --exclude '*' C:\CDs D:\Covers 

The rsync man page has a whole section on filter rules (`man rsync`) which you can read yourself for more insight into its capabilities.

Kind Regards,
Laurence



Reply to: