Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drilling Down into the Folders
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01004860
Message ID:
01004869
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
The following may help to gather all table names into cursor; then you can scan the cursor, and analyse tables.
create curs file_list1 (lcdir c(100), filename c(100), filesize n(10), filedt T )

TotSize1 = iFill("c:\foxwork", "file_list1")

?TotSize1

Return
*-----------------------------
PROCEDURE iFILL(cRoot,file_list)

wait wind nowa padr("Exploring "+alltr(cRoot),200)
LOCAL nNumbofDir,I, acDirAll[1,1],nCumSize,nSize,nCount

nCumSize = 0
nSize = 0
cRoot=ADDBS(cRoot)

release aa
if adir(aa,cRoot+"*.dbf")>0
	for i=1 to alen(aa,1)
		IF  UPPER(JUSTSTEM(aa[i,1]))#"FOXUSER"
			insert into (file_list) values (cRoot,aa[i,1],aa[i,2],CTOT(dtoc(aa[i,3])+" "+aa[i,4]))
		ENDIF
	endfor
endif

nNumbofDir = ADIR(acDirAll,cRoot + "*.*","D")
if nNumbofDir > 0
	=ASORT(acDirAll)
	FOR I = 1 TO nNumbofDir
		IF "D" $ acDirAll[i,5]
			IF LEFT(acDirAll[i,1],1) != '.'              
				nSize = ifill(cRoot + acDirAll[i,1] + '\',file_list)
			ENDIF
		ENDIF
		nCumSize = nCumSize + acDirAll[i,2]
	ENDFOR
endif

RETURN nCumSize
>Hey Gurus!
>
>Given a folder
>
>R:\ROOT
>
>and subfolders
>
>R:\ROOT\ONE
>R:\ROOT\TWO
>R:\ROOT\THREE
>.....
>R:\ROOT\FINAL where we don't know how many sub-folders there are (IMPORTANT!!)
>
>I need to find all tables in these subfolders, including the root, that have at
>least one field with Character Type and Length of 10 (C-10).
>
>Output can go to another final table.
>
>Any ideas? Been done before?
>
>Thanks!!
>
>Tommy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform