2,748
社区成员
发帖
与我相关
我的任务
分享
lcDefaultPath=Sys(5)+Sys(2003)
Set Default To c:\test
nCount=Adir(aDirArray,'ttt*','D')
If nCount>0
For I=1 To nCount
Messagebox(aDirArray(I,1))
Endfor
Else
Messagebox('此目录下没有 ttt 开头的文件夹',48,'信息提示')
Endif
Set Default To (lcDefaultPath)
* 假设只有一个 ttt 开头的文件夹,即使有多个也只返回最先找到的那一个
cRet = ''
cOldDir = sys(5) + curdir()
set defa to c:\test
if adir(aTemp, 'ttt*', 'D') > 0
for ii = 1 to alen(aTemp,1)
if at('D', aTemp[ii,5]) > 0
cRet = aTemp[ii,1]
exit
endif
endfor
endif
set defa to (cOldDir)
if empty(cRet)
? '没找到'
else
? cRet
endif