0

Possible Duplicate:
How can I copy a subset of files from a directory while preserving the folder structure?

I have a bunch of directories like this:

/Artists/Example Name 1/Images/Lo-res/
/Artists/Example Name 2/Images/Lo-res/
/Artists/Example Name 3/Images/Lo-res/

I want to use the cp command to copy all the contents of all of the "Lo-res" directories to another location while keeping their preceding directory structure (the name and images directories) intact.

I've been trying this

cp -R /Artists/*/Images/Lo-res /New_Location/

But that just copies all the files into one new Lo-res folder.

Can anyone help?

mmgg
  • 1

1 Answers1

0

rsync -av /Artists/*/Images/Lo-res/ /New_location/

the trailing / characters on the source and destination directories are very important to rsync to attain the effect you want.

MelBurslan
  • 6,966