You should use the while .. loop function.

Example:
[CODE]
$target_file = "c:\tp\tempw.doc"
? "target_file(1): " $target_file

$loop_cnt=0
$loop_cnt_max=100


while (exist($target_file) or $loop_cnt > $loop_cnt_max)

$loop_cnt=$loop_cnt + 1
? "target_file(2):" $target_file

loop

exit

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to