David,
You need to have the after command on a line by itself. The way you are writing it, tcl thinks that you want that script to execute after 30000msec. The first form of after is what you want in this case which is after .
Try this:
set i 0
file stat $fname1 fstat1
while {$i<5} {
incr i
after 30000
file stat $fname1 fstat2
if {$fstat1(mtime) == $fstat2(mtime)} {
file copy $fname1 $fname2
break
} else {
file stat $fname1 fstat1
}
}
Cheers
John Mercogliano
Semi Retired, contractor
Hampton Roads, VA