Suppose I have a folder structure like:
Libraries\
- UIToolkit\
- files\
- toolkit.h
- toolkit.c
- toolkit.resource
- files\
- NetworkLayer\
- files\
- network.h
- network-info.txt
- files\
...
I need a command so that I can input the Libraries folder and specify a Output folder then in the Output folder I have:
Output\
- UIToolkit\
- toolkit.h
- NetworkLayer\
- network.h
Basically it:
- copies all .h file and preserves the folder structure
- also move all the headers to its sub-libraries' root folders no matter how deep they are in the sub-libraries sub-folders.
I was using rsync but it does not do 2nd step, so I guess I need some quick and dirty modification?
Thanks a lot!
A bit modified answer based on devnull's:
call something like
shall be able to work with absolute or relative directories, IMHO; but won't handle if .h file is right under Libraries (must be at least one subdir level down..).
You can say:
This would copy all the
*.h
files to theOutput
folder as per the desired directory structure.