//-----------------------------------------------------------------
// Function: Clear all files in the specified folder (all files in the specified path)
// Parameters:
// String as_filepath: Specifies the path
// ListBox lb_file: drop-down combo box
// Reverse return value: None
// Written by: lw.2011-05-24
//-----------------------------------------------------------------
Long I
Lb_file.dirlist (as_filepath + "*. *", 0)
If lb_file.totalitems ()> 0 then
For I = 1 to lb_file.totalitems ()
Filedelete (as_filepath + lb_file.text (I ))
Next
End if
Bytes ------------------------------------------------------------------------------------------
Listboxname. DirList (filespec, filetype {, statictext })
Argument Description
----------------------------------------------
Listboxname The name of the ListBox control you want to populate
Filespec A string whose value is the file pattern. This is usually a mask (for example, *. INI or
*. TXT). If you include a path, it becomes the current drive and directory
Filetype An unsigned integer representing one or more types of files you want to list in the ListBox.
Types are:
0 -- Read/write files
1 -- read-only files
2 -- hidden files
4 -- system files
16 -- subdirectories
32 -- Archive (modified) files
16384 -- Drives
32768 -- Exclude read/wirte files from the list.