
1个回答
展开全部
* 假定要测试文件夹名是:"d:\ls\"
SET DEFAU TO D:\LS &&要测试文件夹设置为默认路径
FC=ADIR(A,'*.*')
IF FC=0
WAIT WINDOW '文件夹中为空'
ELSE
WAIT WINDOW '文件夹中文件数:'+STR(FC,4)
ENDIF
* 重新设置默认路径
cCurrentProcedure = SYS(16,1)
nPathStart = AT(":",cCurrentProcedure)- 1
nLenOfPath = RAT("\", cCurrentProcedure) - (nPathStart)
SET DEFAULT TO (SUBSTR(cCurrentProcedure, nPathStart, nLenofPath))
SET DEFAU TO D:\LS &&要测试文件夹设置为默认路径
FC=ADIR(A,'*.*')
IF FC=0
WAIT WINDOW '文件夹中为空'
ELSE
WAIT WINDOW '文件夹中文件数:'+STR(FC,4)
ENDIF
* 重新设置默认路径
cCurrentProcedure = SYS(16,1)
nPathStart = AT(":",cCurrentProcedure)- 1
nLenOfPath = RAT("\", cCurrentProcedure) - (nPathStart)
SET DEFAULT TO (SUBSTR(cCurrentProcedure, nPathStart, nLenofPath))
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询