Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:15:35+00:00 2026-06-15T18:15:35+00:00

I want List all files in a FTP server for Indexing(Main Dir and Sub

  • 0

I want List all files in a FTP server for Indexing(Main Dir and Sub Directories).

How can I get a full list of the files accessible in the server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:15:36+00:00Added an answer on June 15, 2026 at 6:15 pm

    Indy has a TIdFTP component, which has a List() method and a DirectoryListing property. Call List() and then loop through the resulting DirectoryListing as needed. Each item in the DirectoryListing will tell you whether it is a file or a subfolder. If you need to index an entire system, you will have to call List() in a recursive loop for each subfolder.

    Something to keep in mind – there are literally hundreds of platform-specific directory listing formats still being used by FTP servers on the Internet today. The LIST command outlined in the original FTP specification, RFC 959, did not define any kind of formatting to be used for listings, so systems were free to use whatever they wanted to use, and they did do exactly that over the years. Windows and Unix formats are common, but they are not required. A formal listing format was not defined until RFC 3659 in the MLSD extension to FTP, which replaces the old LIST command (TIdFTP.List() does use MLSD if the server supports it).

    I mention this because TIdFTP in Indy 10 uses a plugin system to support many of these different listing formats. Each format is implemented in a separate IdFTPListParse... unit in Indy. By default, only the NLST and MLSD formats are always enabled. For any other listing format you want to support, you need to include the appropriate IdFTPListParse... unit into your uses clause in order for TIdFTP to recognize it. For example, IdFTPListParseUnix and IdFTPListParseWindows. Alternatively, there is a IdAllFTPListParsers unit that enables all of the available parsers. When you call TIdFTP.List(), the TIdFTP.DirFormat property will be set to the name of the parser that was used to parse the raw listing data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to list all files on an FTP server using PHP. According to
I want to list all .xml files in a dir and its subdir. I
i'm connecting to a ftp-server and displaying all items in a list. i want
In C, can I list all files with certain extension inside a dir? Any
I'm trying to list all files in a virtual directory and it's sub directories.
I want to get a list of all files in particular directory.For that |I
How can i list all files in a directory . I want only the
In Python, I want to list all files in a set of directories. The
I want to list all files in a directory Using PyroCMS. Using the Files
In my directory I have subfolders, and I want to list all directories like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.