I'm not sure I follow what you're saying (and I'm also not sure that the word you're looking for is 'copyright'...)
So you're saying that you have program X and your buddy has program Y. You uninstall X and give the files to your buddy, and he in turn uninstalls Y and gives you the files. Is that about right?
In that case, as long as SOMEONE, somewhere along the lines made an original purchase and only ONE license is being used at a time, you're fine.
It is against pretty much every EULA (End User Licensing Agreement) to install in your machine and then install on another machine without uninstalling on the first. Not to say it isn't done 12,000,000 times a day, but it is illegal.
Does that answer your question?