【发布时间】:2020-07-31 08:20:18
【问题描述】:
是否可以在 python 中使用 pycurl-lib 删除 ftp 服务器上的文件?
到目前为止,我的代码无法正常工作,它会抛出:(21, 'QUOT command failed with 550')
c = pycurl.Curl()
c.setopt(pycurl.URL, 'ftp://ftpadress/testdirectory')
c.setopt(pycurl.USERPWD, 'user:pass')
c.setopt(pycurl.QUOTE, ['DELE test.txt'])
c.perform()
c.close()
【问题讨论】:
-
如果Curl真的剥离了服务器发出的550代码的实际错误信息,检查日志文件看看。 + 您是否尝试使用 GUI/命令行 FTP 客户端删除文件?
-
设置
VERBOSE查看完整交互...