I am trying to find a command that finds and copies files with a given name to a another folder but with a slightly different path.
For e.g. there are 4 copies of PNG files named
app/src/main/res/drawable-xhdpi/ic_arrow.png app/src/main/res/drawable-xxhdpi/ic_arrow.png app/src/main/res/drawable-hdpi/ic_arrow.png app/src/main/res/drawable-mdpi/ic_arrow.png
and I would like to copy this to
feature/name1/src/main/res/drawable-xhdpi/ic_arrow.png feature/name1/src/main/res/drawable-xxhdpi/ic_arrow.png feature/name1/src/main/res/drawable-hdpi/ic_arrow.png feature/name1/src/main/res/drawable-mdpi/ic_arrow.png
i.e. the right dpi version of the found file gets copied to the right dpi version of the target directory
does anyone know how I can do this with the find command or a script etc?