List all files using FTP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anders Eriksson

    #1

    List all files using FTP

    Hello,

    I need to list all the files on my FTP account (multiple subdirectories) . I
    don't have shell access to the account.

    anyone that has a program that will do this?

    // Anders
    --
    English is not my first, or second, language
    so anything strange, or insulting, is due to
    the translation.
    Please correct me so I may improve my English!
  • jay graves

    #2
    Re: List all files using FTP

    On Mar 6, 10:46 am, Anders Eriksson <andi...@gmail. comwrote:
    I need to list all the files on my FTP account (multiple subdirectories) . I
    don't have shell access to the account.
    anyone that has a program that will do this?
    Not offhand, but you can look at the ftpmirror.py script for
    inspiration.
    It should be in your Tools/scripts/ subdirectory of your Python
    installation.

    ....
    Jay Graves

    Comment

    • Simon Brunning

      #3
      Re: List all files using FTP

      On Thu, Mar 6, 2008 at 6:11 PM, jay graves <jaywgraves@gma il.comwrote:
      On Mar 6, 10:46 am, Anders Eriksson <andi...@gmail. comwrote:
      I need to list all the files on my FTP account (multiple subdirectories) . I
      don't have shell access to the account.
      anyone that has a program that will do this?
      >
      Not offhand, but you can look at the ftpmirror.py script for
      inspiration.
      It should be in your Tools/scripts/ subdirectory of your Python
      installation.
      This might be of use:

      <http://ftputil.sschwar zer.net/trac>

      --
      Cheers,
      Simon B.
      simon@brunningo nline.net

      Comment

      • Anders Eriksson

        #4
        Re: List all files using FTP

        On Thu, 6 Mar 2008 20:07:46 +0000, Simon Brunning wrote:
        This might be of use:
        >
        <http://ftputil.sschwar zer.net/trac>
        Nice, Just what I needed!

        Thank you!

        // Anders
        --
        English is not my first, or second, language
        so anything strange, or insulting, is due to
        the translation.
        Please correct me so I may improve my English!

        Comment

        • Giampaolo Rodola'

          #5
          Re: List all files using FTP

          On 6 Mar, 18:46, Anders Eriksson <andi...@gmail. comwrote:
          Hello,
          >
          I need to list all the files on myFTPaccount (multiple subdirectories) . I
          don't have shell access to the account.
          >
          anyone that has a program that will do this?
          >
          // Anders
          --
          English is not my first, or second, language
          so anything strange, or insulting, is due to
          the translation.
          Please correct me so I may improve my English!
          If you mean listing ALL files including those contained in sub
          directories if the server supports globbing you can issue a "STAT *"
          command and receive the list of all files on the command channel in an
          "ls -lR *"-like form.
          Not tested:
          >>import ftplib
          >>f = ftplib.FTP()
          >>f.connect('ft pserver.domain' , 21)
          >>f.login()
          >>f.sendcmd('ST AT *')
          an "ls -lR *" is expected to come

          Comment

          Working...