Find to copy files into single directory

Makes copy of subset of dir/ and below with files that match the criteria. It keeps the nested directory structure. Uses

1
2
3
-print0 | xargs -0
 
to handle spaces in Windows names
-print0 | xargs -0

to handle spaces in Windows names
1
find /cygdrive/f/dir1/ -name '*.doc' -print0 | xargs -0 cp -a --target-directory=/cygdrive/c/Temp --parents
find /cygdrive/f/dir1/ -name '*.doc' -print0 | xargs -0 cp -a --target-directory=/cygdrive/c/Temp --parents