How to delete files with a Python script from a FTP server which are older than 7 days?

前端 未结 5 1644
遥遥无期
遥遥无期 2020-12-03 15:25

I would like to write a Python script which allows me to delete files from a FTP Server after they have reached a certain age. I prepared the scipt below but it throws the e

5条回答
  •  攒了一身酷
    2020-12-03 15:51

    What OS are you running on? The file path /test123/*.* is Unix-style yet the message says WindowsError. Are you taking the output of an ftp LIST command, which is in Unix-style, and trying to use it verbatim in a Windows script?

提交回复
热议问题