$pathkey = 'PKS' 
if ($#>3) then $pathkey = $4 endif 
$getpath = $1
$putpath = $2

if ($pathkey = 'PKM') then 
   $getpath = $getpath + '/maclib'
   $putpath = $putpath + '/maclib'
   shell('mkdir ' + $putpath)
else if ($pathkey = 'PKPI') then 
   $getpath = $getpath + '/templates/vnmrj/panelitems'
   $putpath = $putpath + '/templates'
   shell('mkdir ' + $putpath)
   $putpath = $putpath + '/vnmrj'
   shell('mkdir ' + $putpath)
   $putpath = $putpath + '/panelitems'
   shell('mkdir ' + $putpath)
else if ($pathkey = 'PKPSG') then 
   $getpath = $getpath + '/psg'
   $putpath = $putpath + '/psg'
   shell('mkdir ' + $putpath)
else if ($pathkey = 'PKS') then 
   $getpath = $getpath
   $putpath = $putpath
   shell('mkdir ' + $putpath)
else 
   write('alpha','PATHKEY "%s" FOR NAME "%s" NOT FOUND',$pathkey,$3)
   write('line3','PATHKEY "%s" FOR NAME "%s" NOT FOUND',$pathkey,$3)
   return 
endif endif endif endif

$file = $getpath + '/' + $3
exists($file, 'file'):$e1
exists($file, 'directory'):$e2
if (($e1 < 0.5) and ($e2 < 0.5))then 
   write('alpha','FILE NOT FOUND: %s',$file)
   write('line3','FILE NOT FOUND: %s',$file)
else 
   copy('-r',$file,$putpath)
endif 
