News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Tree View of Directories

Started by Robert Collins, January 24, 2005, 06:41:11 PM

Previous topic - Next topic

Robert Collins

Anyone know either how or where I can see how to do a directory scructure on a remote host. I want my FTP program display a tree view of all the folders and subfolders at the remote host. I suppose I could just simply start at the begining so that when the program is in the /home directory it could do a LIST, parse out all the 'd' type records, add them to the tree view, do a LIST one each of those directories and do a deeper search of the LIST results for more inner folders, et, etc. Off the top of my head I see no other way (or I lack the knowledge of a better way). If my method is the correct and only way to do it then I am looking for som assembly code that will control that type of searching. Sounds like a recursive function if you ask me but what to put in that function.

00100b

In much the same way one would use the FindFirstFile/FindNextFile Win32 API's to recursively iterate through a drive, you can use the FtpFindFirstFile and InternetFindNextFile API's of the WinINET library.

Robert Collins

Hi, 4b

Thank you. I appreciate your response as far as pointing me to at least two of the API's needed but you see I don't know how to manipulate (ie code) my original request, so that is why I stated:
QuoteAnyone know either how or where I can see how to do a directory scructure on a remote host
If I was doing assembly on a personl level I would take the time to figure it out the best I could because time would be of no consequences but as it is I have to create some applications for the company and time is of importance and one of the standards I have to follow is to implement as much as possible already functional components.

I am going to play with those two API's on my own time but I am still looking for a quick'n dirty if that's all there is.

Any way, thanks.

sluggy

Just do a google for those API functions that 00100b mentioned, you will get tons of examples. It doesn't matter what language the examples are in, the method is still exactly the same.

In any case, it is just a normal recursive directory scan that you need, that takes maybe an hour to code and test, all you need to do is add a line of code to this very standard functionality to add the appropriate node to a treeview.