Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Retrieve FTP directory with hidden files

Reply
Thread Tools

Retrieve FTP directory with hidden files

 
 
Lothar Scholz
Guest
Posts: n/a
 
      06-25-2004
Hello,
i know that this is not a python but a FTP protocol question but maybe
someone in this newsgroup could help me.

I use the standard ftplib.FTP class and get the listing wia
ftp.retrlines('LIST mydir')
but this does not get hidden files like ".htaccess" and more important
i can't delete directories because they are not empty.


 
Reply With Quote
 
 
 
 
Oliver Fromme
Guest
Posts: n/a
 
      06-25-2004
Lothar Scholz <(E-Mail Removed)> wrote:
> I use the standard ftplib.FTP class and get the listing wia
> ftp.retrlines('LIST mydir')
> but this does not get hidden files like ".htaccess"


This should work:

ftp.voidcmd("CWD mydir")
ftp.retrlines("LIST -a")

But of course you're at the mercy of the FTP server -- if
it insists on not returning "hidden" files to you, there's
nothing you can do about it.

> and more important
> i can't delete directories because they are not empty.


Correct. You have to delete the files in them first. The
FTP protocol (RFC959) does not specify recursive removal of
directories, as far as I remember.

Best regards
Oliver

--
Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany

``All that we see or seem is just a dream within a dream.''
(E. A. Poe)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
how to retrieve hidden field value in next page in asp.net? priyajee Software 2 12-09-2009 01:02 PM
Command or script to delete hidden files on ftp? Jason Priest Perl Misc 2 01-08-2005 11:30 AM
Retrieve value from hidden/disabled DropDownList? Cipher ASP .Net 1 07-11-2004 03:52 AM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM



Advertisments