As we know, *cp -r source\_dir intended\_new\_directory* creates a copy of source directory with a new name. Now I want to do the same but want to exclude a particular file. I have found some related answers here, using *tar* and *rsync*, but in those solutions I need to create the destination directory first (using mkdir).  

I honestly searched a lot, but didn't find exactly what I want.  

So far the best I got is this: 

```
tar -c --exclude=\*.dll --exclude=\*.exe sourceDir | tar -x -C destDir

```

(from <http://www.linuxquestions.org/questions/programming-9/how-to-copy-an-entire-directory-structure-except-certain-files-385321/>)