f_del_file.srf 514 B

123456789101112131415161718192021
  1. $PBExportHeader$f_del_file.srf
  2. global type f_del_file from function_object
  3. end type
  4. forward prototypes
  5. global subroutine f_del_file (string filepath, listbox lb_file)
  6. end prototypes
  7. global subroutine f_del_file (string filepath, listbox lb_file);int rst
  8. rst = f_create_directory(filepath)
  9. IF rst=-1 THEN RETURN
  10. long i
  11. lb_file.dirlist(filepath+"*.mhtml",0)
  12. if lb_file.totalitems() > 0 then
  13. for i = 1 to lb_file.totalitems()
  14. filedelete(filepath + lb_file.text(i))
  15. next
  16. end if
  17. end subroutine