#! /bin/sh

sessiondir=../sessions
fdir=$sessiondir/$w_wims_session/getfile
test=`echo $w_wims_session $w_oldf_ $w_newf_ | grep '\.\.'`
if [ ! -d $fdir ] || [ ! -z "$test" ] || [ -z "$w_oldf_" ] || [ -z "$w_newf_" ]; then exit; fi

cd $fdir
find random/* -mmin +10 -exec rm '{}' \;
mkdir -p random
ln -fs ../$w_oldf_ random/$w_newf_

