VB读取文件列表
'请帮忙把*描述的地方都改成代码,谢谢! Option Explicit Public Sub PrintFileList() Dim i As Integer Dim filelist() As String '取得扩展名是exe的,所有文件列表 Call GetFileList("c:\temp\", "exe", filelist) For i = 0 To UBound(filelist) Debug.Print filelist(i) Next i End Sub Public Sub GetFileList(ByVal in_path As String, _ ByVal in_ext As String, _ out_filelist() As String) *循环读取in_path,及子目录 *判断是否存在后缀为exe的文件 *如果存在,添加到out_filelist *比如添加字符"c:\temp\a\app1.exe" End Sub
添加reference,microsoft scripting runtime dim fso as new filesystemobject dim ofile as file dim ofolder as folder set ofolder = tfolder("c:\temp\") redim filelist(0) as string for each ofile in ofolder if right( ,4)=".exe" then tmpnum=ubound(filelist) redim filelist(tmnum+1) as string filrlist(tmpnum+1)= end if next
答:恩很多都这样多试几次不过能更新了也郁闷 那速度还没蜗牛走的快 呵呵详情>>
答:线性链表分好几种,分为单链,双链等,它们的存储顺序也不一样. 线性表是顺序存储的,占顺序的存储空间详情>>
问:电脑安装了VB6.0,为什么打开方式里面没有VB程序选项,进安装好的VB里去关联...
答:打开方式最下面还有一个《选择程序》,点开后查VB的安装目录的EXE,找到后直接打开,下次就会在打开方式里查到了详情>>