!!! test if common_files=yes
!read wimshome/$Docdir/.def
doc_=$doc/
!if $common_files=yes
   doc_=
!endif
!if $job2=deposit and $wims_deposit!=$empty \
	and / notin $wims_deposit and .. notin $wims_deposit
 !sh mkdir -p $wims_home/$Docdir/$(doc_)files\
  mv $wims_home/$wims_sesdir/user-deposit $wims_home/$Docdir/$(doc_)files/$wims_deposit\
  cd $wims_home/$wims_sesdir\
  mkdir -p getfile\
  cd getfile\
  rm -f doc\
  ln -s $wims_home/$filelink/files doc
 !read quota.proc
 !if $quota_free<0
  !sh rm -f $wims_home/$Docdir/$(doc_)files/$wims_deposit
  error=quota_file
 !endif
!endif

!if erase isin $job2 and .. notin $job2
 erase=!item 2 of $job2
 !sh rm -f $wims_home/$Docdir/$(doc_)files/$erase
!endif

flist=!filelist $wims_home/$Docdir/$(doc_)files
flist=!words2items $flist
f1=$wims_deposit
!if $f1 notin $flist or $f1=
  f1=!item 1 of $flist
!endif
!read quota.proc

