The Daily Click ::. Forums ::. Klik Coding Help ::. How do I get a directory list?
 

Post Reply  Post Oekaki 
 

Posted By Message

Joshua M.



Registered
  01/06/2004
Points
  1999
9th April, 2005 at 07:47:43 -

I'm working with MMF and I was wondering how to get a list of directories from FTP. I tried some stuff, but it didn't work. Can somebody help?


 

Cybermaze



Registered
  03/04/2003
Points
  853
11th April, 2005 at 06:24:14 -

Well ... I am fooling around with the FTP object myself.

I assume you know how to connect to a FTP server, so I will jump ahead to get a list.

It is basically easy.

1. You set the directory. I believe the action is "FTP object" -> "Directory" -> "Set directory". Then type the directory you want to search. Normally when you arive you would search the root directory "/". The FTP object may assume (that is set) the directory to "/" automatically. I really havent tried if it works.

2. Start the search. The action is "FTP object" -> "Directory" -> "Load". In the input box simply choose "*" to retrieve everything in the directory.

3. Retrieve the result and process it one at a time. Simply put this in a group. Open the group when you have set the directory and initiated the search open this group and close it when you are done.

I have a problem here since I cannot get the "scanned name is directory" and "scanned name is file" to work, so I have not found a good way to distinguish between files and directories. As a start you could use the "Tree object" and simply add everything as a folder or item. Anyways your group should be something like:

+ Always
- "FTP object" -> "Directory" -> "Scan"

+ Scanned name ("FTP object") <> ""
- "Tree object" -> "add item"/"add folder" etc.

+ NEGATE "FTP object" -> "Directory" -> "More directories to scan"
- Close this group

Also note I was not home at the time of writing, so I may check my post when I get home to make sure I called the things the right things. If youd like I could send you a file cca with what I described.

 
If you knew, I would have to kill you...
   

Post Reply



 



Advertisement

Worth A Click