I have a few .html files that I need to copy from one place to another.
The source folder has files other than .html, so I need to first find only the .html files and then copy them to the other directory while I maintain the same structure.
Something like this:
cp --parents `find ./src -name '*.html'` ./dist
The problem is that the files are placed inside ./dist/src/**/*.js and not ./dist/**/*.js.
So to summarize, I want to copy all of the files (while maintaining folder structure) from one folder to another without the source parent folder.
For example:
src/
folder1/
a.html
a.x
folder2/
folder3/
b.html
to
dist/
folder1/
a.html
folder2/
folder3/
b.html