I have a folderA remotely which has 2 subfolders folderB and folderC.I have to search for my
file where it is located in the 2 subfolders(folderB and folderC) and should copy it.
Is it possible with rsync and a script like thing.
You could always use find over ssh:
This opens up two SSH connections, so you'll be prompted for the password twice unless you've set up unprotected key-files.
Sure, using rsync just exclude everything, then only include the name of the file you want: