Welcome to ftpext’s documentation!


ftpext – Main package

class ftpext.ftpext.FTPExt(host, port, user, password, use_ssl=False, use_log=False, debug=0)[source]

Bases: ftplib.FTP_TLS

Extensions to the ‘ftplib’ standard library. Features include: XDUPE support. Stat -L directory listing support. FXP-support CPSV/PSV. Logging and other useful features, have a look yourself.

I’ve made the getter functions thread-safe to make multiple objects easier to handle. It inherits from ftplib.FTP_TLS which means that it supports AUTH TLS and Clear Text, which to use is specified when the object is initialized.


Disable pre transfer support. http://www.drftpd.org/index.php/PRET_Specifications


Enable XDUPE support. http://www.smartftp.com/static/Products/SmartFTP/RFC/x-dupe-info.txt


Enable pre transfer support http://www.drftpd.org/index.php/PRET_Specifications


Enable XDUPE support. http://www.smartftp.com/static/Products/SmartFTP/RFC/x-dupe-info.txt

fxp_to(file, target, target_file=None, type='I')[source]

FXP (server-to-server-copy) a file between 2 servers.


The last command that was sent to the server.


The last response received from the server.


Log with all server communication


Get directory list via STAT -L command. Returns a dict where the keys are the filenames and the value is information about the file/directory.

secure_fxp_to(file, target, target_file=None, type='I')[source]

FXP (server-to-server-copy) a file between 2 servers. This uses CPSV instead of PASV to fxp file with SSL encryption


List of dupes, if xdupe is enabled then each time the server returns an 553 (xdupe) response this variable will be populated with the dupe filenames