# Re: Answer "使用 FileSystemObject 来取得某目录内的所有档案"

Posted by Spencer Yang on March 28, 1999 at 22:58:52:

In Reply to: Re: 如何使用 FileSystemObject 来取得某目录内的所有档案呢?? posted by 小v on March 28, 1999 at 22:30:08:

资料来源: 王国荣编着<>pp.411-412
Dim fso as New FileSystemObject
Dim fld as folder
Dim fim fil as File
dim strPath as String

strPath = "c:\"
set fld = fso.GetFolder(strpath")

Listview1.view=lvwlist ' 全部显示
For Each fil In fld.files
Listview1.ListItem.Add ,, Fil.Name
Next

Good Luck

---------
Spencer Yang

Follow Ups:

- Re: Answer "使用 FileSystemObject 来取得某目录内的所有档案" Rong 20:42:54 3/29/99 (1)
  - Re: 错误修正 Spencer Yang 01:22:37 3/30/99 (0)