$sFrom[157.html] $sCopy[newdir1/157.copy] $sMove[newdir2/157.move] ^try{ Copying file: ^file:copy[$sFrom;$sCopy] ^if(-f $sCopy){ ok. }{ no copy errors but target file doesn't exist. } }{ failed. $exception.handled(1) }
^if(-f $sCopy){ Moving file: ^try{ ^file:move[$sCopy;$sMove] ^if(-f $sMove){ ^if(-d ^file:dirname[$sCopy]){ moving ok but source dir still exist. }{ ok. } ^file:delete[$sMove] }{ no move errors but target file doesn't exist. } }{ failed. $exception.handled(1) } }