Re: Get A Full Directory Structure - WeOnlyDo Discussion board

Re: Get A Full Directory Structure (General questions)

by Peter, Tuesday, March 22, 2005, 02:56 (7188 days ago) @ wodSupport

Oh my hehe... I should have read the docs better! I just coded my own recursivity function.

I wonder what loopitems does however if parsing fails halfway on an FTP with 20000 or more folders, does it have to entirely restart or does it know where it left off?

For that reason, it can be good to have your own procedure, like this thing that I came up with: (error trapping must of course be added still)


You dim an array() and a counter
You put the startpath in the array

Array(1) = /startpath/

You start a nested for each loop:

counter = 1
For Each thing in Array()

objFTP.ListDir array(counter) '/ get dirlisting

for each item in DirItemsCollection() '/ wodftpdlx.diritems()
debug.print item.name '/ display item (dir or file)
if item.type = directory then '/ populate array with dirs to CWD to
counter = counter + 1
Array(counter) = item.Name '/ only dirs are put here
next item

Next thing

Or you can use the ListItems event, to extract your data from after listing the initial path.


Complete thread: