dude, your targetdir is actually file path.
try with this:
code:
$id = file name found previously

$sourcefile="c:\Lotus\Notes\Data\names.nsf"
$targetdir="\\orrm\domino\local_notes\"
if not exist($targetdir)
md $targetdir
copy $sourcefile $targetdir + "$id"

_________________________
!

download KiXnet