Source Structure ``` folder
|----Sub-Folder-1
| |-a.js
| |-b.js
|----Sub-Folder-2
| |-c.js
|-d.js
|-e.js
```
Destination structure before running copy task ``` folder
|----Sub-Folder-1
| |-a.js
|-e.js
```
I need the destination folder to be exactly the same as src folder but I don't want to overwrite the existing files, like a.js and e.js in the above example already exist so they should not be touched, other files/folders should be created, so I want to recursively check inside 'folder' if a file exists or not and copy it if it doesn't exist. I have been using following filter for not overwriting single files filter: function (filepath) { return !(grunt.file.exists('dest')); } but 'folder consists several subdirectories and files so it is not feasible to write for every file. Please help in writing custom grunt task which can do this .