Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Files and Dirs

Posted on 1998-04-07
3
Medium Priority
?
189 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 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 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