Hi all,

I have a problem with a script that is observing a directory. This program is running permanently on a server, but sometimes (after days or weeks) it terminates. Is there a way to find out why it stops?

This is a part of the script:

 Code:
IF EXIST ($lokal + "*.br*")
	  $FileName = Dir($lokal + "*.br*")

          While $FileName <> "" and @ERROR = 0

          ? $FileName
	  $Result = GetFileSize($lokal + $FileName)
          ? $Result

	  if $Result > 0
		copy $lokal + $FileName $lokal1 + $FileName
		copy $lokal + $FileName $lokal2 + $FileName
		copy $lokal + $FileName $lokal3 + $jahr + "\" + $FileName
		move $lokal + $FileName $remote + $FileName
	  endif

	  $FileName = Dir()

	  Loop

	endif


Thanks in advance

Carsten


Edited by Allen (2008-07-12 11:00 PM)
Edit Reason: added code tags