Solved

Files and Dirs

Posted on 1998-04-07
3
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LAN or WAN ? 11 120
Unique identifier on a terminal server (rdp) 4 85
Delphi and Access based Enumeration 9 90
Multi-layered image in FireMonkey 9 93
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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