Question about unix copy function

Hello, Im working with a app where I am copying files from a “select file” prompt to a mounted volume. It works fine as long as the file to copy does not reside on my desktop. It can be in a folder on the desktop and it will work fine. Any ideas?

Thanks

on CopyFile(cp_or_mv, filePathFrom, filePathTo)
		set posixfilePathFrom to quoted form of (POSIX path of filePathFrom)
		set posixfilePathTo to quoted form of (POSIX path of filePathTo)
		do shell script cp_or_mv & " " & posixfilePathFrom & " " & posixfilePathTo
	end CopyFile

cp -f forces to overwrite the target file if exists…

Even with the -f It still will not copy file that are on my desktop. Any other idea’s?

coerce the “cp_or_mv” to string?