您的位置:首页 > 其它

pb删除指定文件夹下所有文件

2014-03-27 14:12 405 查看
//-----------------------------------------------------------------

//功 能:清空指定文件夹下所有文件(指定路径下所有文件)

//参 数:

// string as_filepath:指定路径

// listbox lb_file :下拉组合框

//反回值:无

//书写人:ljh 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

------------------------------------------------------------------------------------------

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐