Spain could not of done the job by itself in the 18th century it was too weak both economicly and militarily. Although still stronger than Portugal. A joint French-Spanish attack might of worked but they never would of been able to integrate Portugal into Spain.
Also anytime France was involved it would surely mean British involvement.