Can i search for a file recursively and if it exists sync only the directory that it exists in.

Thanks