ftplib question - ftp.dir() returns something and ftp.nlst() does not

N

Nico Grubert

Hi there,

I am using the ftplib library to connect to a ftp server.
After I got connected, I can see a list of file in the current directory
using ftp.dir() or ftp.retrlines('LIST'). But using ftp.nlst() returns
an empty list which seems somehow strange to me. Here is, what I did:
-r--r--r-- 1 owner group 121984 Nov 24 12:13 member.dat
-r--r--r-- 1 owner group 115 Nov 24 15:53 status.dat
-r--r--r-- 1 owner group 339 Nov 24 15:53 debug.txt-r--r--r-- 1 owner group 121984 Nov 24 12:13 member.dat
-r--r--r-- 1 owner group 115 Nov 24 15:53 status.dat
-r--r--r-- 1 owner group 339 Nov 24 15:53 debug.txt
'226 Transfer complete.'

I thought "ftp.nlst()" would return the list ['member.dat',
'status.dat', 'debug.txt']. Any idea, what is going wrong here?

Nico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top