Using automator (or something else) to delete files from ftp server

Discussion in 'Mac Programming' started by Dimwhit, Jan 12, 2015.

  1. Dimwhit macrumors 68000


    Apr 10, 2007
    I created an automator service to select a file and upload it to an ftp server. I have to do this regularly. But what I really need to do is delete the files in that remote directory before the file uploads.

    Anyone know how, or if, that can be done?
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    What's in your Automator upload service?

    Is it a "Run AppleScript" action? A shell script action? Commands to a Terminal window? AppleScript commands to an FTP client app?

    What is your OS version?
  3. ArtOfWarfare macrumors G3


    Nov 26, 2007
    Python has an ftplib built in that makes FTP tasks pretty trivial.
  4. Dimwhit thread starter macrumors 68000


    Apr 10, 2007
    I'm using a Transmit upload service. In on Yosemite (latest version).
  5. superscape macrumors 6502a


    Feb 12, 2008
    East Riding of Yorkshire, UK
    I've not tried curl on the command line for this particular purpose, but it looks like you *can* use it to delete files over ftp. Check out instructions on this page:

    (Look for "Deleting files on FTP server", about half way down)

    I'm assuming curl is pretty much the same on Linux and OS X. Hope that's of some help!

Share This Page