DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Generate List of Files on FTP  (Read 8,017 times)

blackcat

  • Participant
  • Joined in 2007
  • *
  • Posts: 62
Generate List of Files on FTP
« on: March 18, 2008, 04:41 PM »
hello. I've been spending hours of time searching for this kind of program today but found nothing about it. I need a program that can generate simple list of all files on my ftp server. Any idea is appreciated.  :)

tinjaw

  • I'm so glad breakbeat techno isn't an illegal drug
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
Re: Generate List of Files on FTP
« Reply #1 on: March 18, 2008, 06:26 PM »
What type of access do you have to the server? That is the determining factor.

For example, if it is a *nix box and you have SSH access, then pipe a recursive file listing to a text file.

Or if you only have FTP access, then you have to spider the tree and compile a directory listing. A script based around wget and ls should get you what you need.

What are your options?

blackcat

  • Participant
  • Joined in 2007
  • *
  • Posts: 62
Re: Generate List of Files on FTP
« Reply #2 on: March 18, 2008, 11:40 PM »
tinjaw, just ftp access.

tinjaw

  • I'm so glad breakbeat techno isn't an illegal drug
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
Re: Generate List of Files on FTP
« Reply #3 on: March 19, 2008, 12:09 AM »
Putting aside for the moment that such a program, can be written, because it can  :P, why do you want this? How are you going to use it?

I ask because it will fundamentally determine how such a program would work. I mean, what would you do with a listing of a thousand files that went ten sub directories deep? What purpose would it serve?

For example, do this. Open a command prompt and run this.

Code
dir c:\windows /S /B > c:\filelist.txt

Wait about 15 seconds and then open up the 1+ MB file it produces (c:\filelist.txt). What good is it?

blackcat

  • Participant
  • Joined in 2007
  • *
  • Posts: 62
Re: Generate List of Files on FTP
« Reply #4 on: March 19, 2008, 12:29 AM »

Code
dir c:\windows /S /B > c:\filelist.txt

this is exactly how i want the list looks like  ;D just filenames with their full path. this list is just for record of files i already uploaded on the ftp.


edit: i must tell you that my ftp login id is in this format : xyz@zyx.com
« Last Edit: March 19, 2008, 12:55 AM by blackcat »

Original address: https://www.donationcoder.com/forum/index.php?topic=12700.0