     } eof {
       send_user "connection interrupted\n"
       continue
+    } -- "--- more ---" {
+      send -s " "
+      set data [concat $data [split $expect_out(buffer) "\n"]]
+      exp_continue
     } "*-> " {
-      set data [split $expect_out(buffer) "\n"]
+      set data [concat $data [split $expect_out(buffer) "\n"]]
       foreach line $data {
-        if { ! [ regexp {( on disk|.+->|exec vfs ls)} $line ] } {  
+        if { ! [ regexp {( on disk|.+->|exec vfs ls|\-\-\-|\b+)} $line ] } {  
           regexp {\s*(\S+)\s+} $line devnull filename
           send -s "exec vfs unlink flash:/kav_db/$filename\r"
-          expect "*->"
+         expect "*->"
         }
       }
       sleep 5

      send -s "exec vfs ls /kav_db\n"
    }

    expect timeout {
      send_user "connection timeout\n"
      close

    }

    match_max 2000
  } 

  expect timeout {
    send_user "connection timeout\n"
