add subdir option, fix #18176
Merge pull request #18330 from thatch45/copy_subdir

add subdir option, fix #18176