how to cp files to dir,using routine?

hi all,

I wanted to know how we can copy files to dirs, through a routine and when the file and the dir are specified as parameters for that routine and explicitly called?

Eg: suppose i want to copy file1 to /tmp then

myproc()
{
.
.
}

myproc /path/file1 /tmp/
These parameters when passed to the myproc() ,file1 should be copied to /tmp

May i know how it can be done?

myproc()
{
  cp $1 $2
}

myproc /path/file1 /tmp/

I have tried that, but its not working....
Says something like this, "file1 : no such file or directory"

is there any other way?

Thanks

If the file don't exist that's normal.

that is correct, the file doesnt exist....
However why is it that we cannot emulate the cp command ,from the routine?

How is it that when using the cp cmd it works fine,but only when parameters are passed ,and expected a cp,this thing fails???

Secondly, this function is to be included in a boot script that actually copies a few files onto /tmp....
Since this was not working unless a file was specified as the "dest" i created a dummy file in tmp(having the same name) then used a suitable () to cp from src to dest, but i get some memory issues,.....
What could be the problem?