Solved

Files and Dirs

Posted on 1998-04-07
3
183 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
ID: 1361321
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
ID: 1361322
Uhm,  you mean i can't display that both in same window ?
0
 
LVL 1

Accepted Solution

by:
extreme earned 100 total points
ID: 1361323
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
delphi parse string to params 3 136
When i run adoquery my application freezes 26 178
Adoquery sql  left join does not work 25 98
Dev express lookupcombo 3 34
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

790 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