Is it possible to delete a file via FTP?

Find quick help here to get you started with Hollywood
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Is it possible to delete a file via FTP?

Post by jPV »

amyren wrote: Sat Mar 27, 2021 2:08 pm The RawFTP command LIST could probably be used to fetch a directory file list but I notice that it needs a PORT or PASV command, so this could be just as complicated as the mentioned STORE command?
Yes, getting directory listings require a data port, just like when transferring files. That's why you can't get listings sometimes if you have a wrong passive setting in your FTP client, even though you're able to connect. In the PORT mode the data connection is made from the server to the client (usually get blocked by your router nowadays) and in the PASV mode the connection is made from the client to the server. Anyway, it indeed gets complicated to handle these on your own.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Is it possible to delete a file via FTP?

Post by amyren »

Thank you, that works for me.
Your script was almost ready to run, just needed to add "/" to the ftp adress to make it work.
Quite a lot of code to do a single thing, so I doubt I would have figured that out by myself without growing even more gray hairs. :D
Post Reply