Solved

Files and Dirs

Posted on 1998-04-07
3
176 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

26 Experts available now in Live!

Get 1:1 Help Now