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

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.

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?

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):