Your best friend for file transfer.

Fetch application logoFetch

Must delete files twice; Script won't at all (5 posts)

  • Started 13 years ago by Hoons724
  • Latest reply 13 years ago from Hoons724
  • Hoons724 Member

    Through a single host, I transfer hundreds of files daily. Each transfer returns a receipt from the backend in the form of a text file. When I delete the receipts through the Fetch toolbar, the files disappear. However, when I refresh the window, the files reappear. I delete them again, and then they are gone for good. It always take two 'deletes' to get rid of them. It's not a terrible nuisance, however I'm trying to script this process that would include the downloading and deletion of these files but the same thing occurs except the files NEVER successfully delete. I've tried using the Standard Suite 'delete' and Interarchy Suite 'remove'. Both seem to work as planned, but upon refresh, the files reappear every single time.

    Any help is appreciated.

    Thank you!

    Posted 13 years ago #

  • Jim Matthews Administrator

    Hi,

    Could you do a test run with just one file, and then post the contents of the Fetch Transcript window (it's listed in the Window menu)? I'd like to see what the server is saying when the script deletes the receipt file, and then what the server says when you refresh the list?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 13 years ago #

  • Hoons724 Member

    Here you go. Thanks!

    1 file in list (90000000_19LINB.ADM). Script run to download and delete....

    TYPE I
    200 TYPE set to I
    MDTM 90000000_19LINB.ADM◇◇◇◇◇◇◇◇◇◇◇◇◇◇
    502 Bad command or it is not implemented here.
    SIZE 90000000_19LINB.ADM◇◇◇◇◇◇◇◇◇◇◇◇◇◇
    502 Bad command or it is not implemented here.
    PASV
    227 Entering Passive Mode (204,90,130,189,236,134)
    Making data connection to 204.90.130.189 port 60550
    RETR 90000000_19LINB.ADM◇◇◇◇◇◇◇◇◇◇◇◇◇◇
    150 Opening BINARY mode data connection for transfer
    226- 1 documents are received
    226 Transfer complete.
    Successful download of 90000000_19LINB.ADM as binary data (123 bytes, 123 bytes/sec, 0:01 elapsed) completed at 1/18/11 12:41 PM
    DELE 90000000_19LINB.ADM◇◇◇◇◇◇◇◇◇◇◇◇◇◇
    250 Document (90000000_19LINB.ADM) is deleted from mailbox 100385GRAP.

    File gone from list. Then refresh is done....

    CWD Sender=100385GRAP
    200 Sender=100385GRAP Receiver=100385GRAP APRF=*BINARY
    PWD
    257 Sender=100385GRAP Receiver=100385GRAP APRF=*BINARY
    TYPE A
    200 TYPE set to A
    PASV
    227 Entering Passive Mode (204,90,130,189,236,120)
    Making data connection to 204.90.130.189 port 60536
    LIST
    150 Opening ASCII mode data connection for transfer
    -r-------- Y ADM 1024 Jan 18 12:35 90000000_19LINB.ADM◇◇◇◇◇◇◇◇◇◇◇◇◇◇
    226 Transfer Complete.

    I can run the script over and over and it always comes back on refresh, however, using toolbar, it only comes back on 1st refresh and then finally is gone on 2nd delete/refresh.

    Posted 13 years ago #

  • Jim Matthews Administrator

    That's wild. I wonder if you could script Fetch to keep refreshing the file list until the delete actually works. The AppleScript would look something like this (where nameOfFileToDelete is a variable holding the name of the file to delete):

    tell application "Fetch"
    set notDeleted to true
    repeat while notDeleted
    delete remote file nameOfFileToDelete of transfer window 1
    refresh file list transfer window 1
    set notDeleted to exists remote file "Automator.crash.log" of transfer window 1
    end repeat
    end tell

    Does that help?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 13 years ago #

  • Hoons724 Member

    I will give it a shot and report back. Thanks!

    Posted 13 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.