Solved

Files and Dirs

Posted on 1998-04-07
3
174 Views
Last Modified: 2010-04-06
I need to know how to list the index, i mean the files and the directories from an FTP-Server in a
Window Box. I'm not sure which one i should use, i thaught of a TListView or a TreeView. It should
be able to list BOTH, files and dirs in same window at same time. So that window should look like
the example below...

---------------------------------------------------------------
Name               Type              Date           Size
---------------------------------------------------------------
Dos               Directory         xx.xx.xxxx     0
Windows            Directory         xx.xx.xxxx     0
Config.sys         System - File     xx.xx.xxxx     400
Autoexec.bat       Batch - File      xx.xx.xxxx     500
ReadMe.txt         Text - File       xx.xx.xxxx     2500


I think you know what i mean here, DOS and WINDOWS are in that case both directory and the other
ones are files. If the user clicks on a Directory the program should automatically list this directory
index. If a Click on a File, it should download it.

---------------------------------------------------------------
Name               Type              Date           Size
---------------------------------------------------------------
..                 Directory         xx.xx.xxxx     0
Data               Directory           xx.xx.xxxx     0
File.dat         DAT - File           xx.xx.xxxx     3000
Pic.jpg                 JPEG - Image      xx.xx.xxxx     4000


The two points (..) mean "go to next higher directory". the rest are also some files in that directory
and DATA is another Sub-Dir.

I know how to Send or how to get files, but like i said, i have no idea yet, how to list these files
and the directories.

Thank you very much for information about that.

                                          Roger ;)
0
Comment
Question by:omsec
3 Comments
 
LVL 1

Expert Comment

by:pjdb
Comment Utility
For me, the best way is to use a TTreeView for directories and a TListView for files and directories of the current directory. Such a use will give a windows ressembling to the Explorer.

JDB
0
 
LVL 2

Author Comment

by:omsec
Comment Utility
Uhm,  you mean i can't display that both in same window ?
0
 
LVL 1

Accepted Solution

by:
extreme earned 100 total points
Comment Utility
What you need for list the files are the FTP commands suited for that purpose. These commands include several commands. For get the files in a directory you have to use the List command, to move to the parent directory the command is CDUP. and there are a lot of other commands you can use to this. I really cannot show you here all the commands you can use to control you ftp connection because is to long, so I suggest you to get the RFC 959 for a complete specification of the protocol. I don't remember the web page where I got this RFC, but if you want e-mail at k2xt@iname.com and I'll send you this RFC. Better enough, if you can get an FTP component that will be better that handle this by your self. Anyway, try to get the RFC or e-mail me for it.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now