I am developing an Android-app in OS X, and want to use some third-party icons. I have downloaded and extracted the icons into this folder structure:
- drawable-mdpi
- ic_icon1.png
- …
- drawable-hdpi
- ic_icon1.png
- …
- drawable-xhdpi
- ic_icon1.png
- …
- drawable-xxhdpi
- ic_icon1.png
- …
I want to copy the files named ic_icon1.png from each directory into my own folder structure with the same folders, ignoring the rest of the icons in the source folders. How can I accomplish this using Finder or Terminal?
Best Answer
You can use
gcp
from homebrew for this. Installgcp
withThen You can make something like this:
This will copy all
ic_icon1.png
preserving directory tree.From
man gcp
: