CLOSE DATABASES
create cursor _thedir (cc c(250)) &&建立??表
**********************
insert into _thedir (cc) value (alltrim(getdir()))&&指定搜索根目錄
select _thedir
go top
store recno() to goo
****
do while !eof()
goto goo
*************
store alltrim(_thedir.cc) to thedir
_Dir=thedir+"*.*"
_Count=adir(_File,_Dir,"D")
for i=1 to _Count
IF "D"$_file(i,5) and !_file(i,1)=="." and !_file(i,1)==".."
insert into _thedir value(thedir+_file(i,1)+'\')
endif
endfor
*****************
select _thedir
goto goo
skip
store recno() to goo
***********************
enddo
COPY TO PUTFILE("匯出檔名","_TheDir","csv") TYPE csv
全站熱搜