copying files with dumb characters

hello
I'm trying to batch copy files from one location to another. My script get's the output of a find command (i.e. find /disk3/jpm/seq -type f | xargs copy2boss)
The script works fine, except when filenames contains whitespace, backslashes and so on. Any hints? Is there another more accurate approach?

I need to copy files from user's seq directory to the boss's seq folder. The destination folder depends on the source folder.
Example copy
/disk3/user1/seq/tah/file1
to
/disk3/boss/seq/tah/file1

Here's the copy2boss script (sorry for the tcsh :o)

@ loop = 0
while ( $loop < $# )
    @ loop ++
    set current_file = $argv[$loop]
    set target = (`echo $current_file | sed 's:\(\/disk3\/\).*\(\/seq\/\):\1boss\2:'`)
    set target_dir = (`echo $target | sed 's|\(.*/\).*|\1|'`)
    if ( ! -d $target_dir ) then
        mkdir $target_dir
        chown boss:user $target_dir
    endif
    if ( ! -r $target ) then
        cp -p $current_file $target
        chown boss:user $target 
    endif
end

best regards

Try enclosing all the sensible variables into double quotes, like this:

cp -p "$current_file" "$target"

thank you for the answer
I tried it but doesn't work. The problem comes probably from the fact that I'm a newbie and didn't choose the right method.

What I found out is that I should enclose the find output with quotes before passing it to the script. This way nothing (hopefully) get interpreted.

find /disk3/omar/seq/plasmids/ -type f | sed "s/.*/\'&\'/" | xargs copy2boss

And I also did follow your suggestion as this

#!/usr/bin/tcsh 
##
#
#
@ loop = 0
while ( $loop < $# )
    @ loop ++
    set filename   = `basename "$argv[$loop]"`
    set source_dir = `dirname "$argv[$loop]"`
    set target_dir = `echo "$source_dir" | sed 's/\(\/disk3\/\).*\(\/seq\/\)/\1boss\2/' `
    set output = "cp -pR '$source_dir/$filename' '$target_dir/$filename'"
    
    if ( ! -d $target_dir ) then
        mkdir $target_dir
        chown boss:user $target_dir
    endif
    if ( ! -r "$target_dir/$filename" ) then
        eval $output
        set output = "chown boss:user '$target_dir/$filename'" 
        eval $output
    endif
end 
exit