• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving large PDF files with Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving large PDF files with Applescript


  • Subject: Re: Moving large PDF files with Applescript
  • From: David Crowe <email@hidden>
  • Date: Wed, 1 Apr 2009 11:51:12 -0500

John;

My experience with anything based on timing is that it's inefficient and subject to working really well for some period of time and then failing miserably.

If the transfer code bombs before it write the .end file it probably didn't finish transferring the main PDF file. In which case the timing version will move it as if it was a completed file, but the version based on transmission of a second file with fail-safe, leaving the partial file in place. In the unlikely event that only the transmission of the second tiny file fails, the original file will remain in place to be manually moved. Presumably in this unusual case someone would open up the file to make sure it was fully transferred.

If this is a common problem, the transfer code could check for files that are in the folder and older than a certain time (say 1 day, 1 week) and then offer to delete them or move them. Or you could just manually clean up once in a while.

You're right that no code is perfect, but code that obscures errors is not to be preferred.

- David


At 8:35 AM -0700 4/1/09, email@hidden wrote:
On 3/31/09 5:27 PM, "David Crowe" <email@hidden> wrote:

 I don't like the idea of timing loops, as it will inevitably fail at
 some point, no matter how long you make the delay between checks.

 If you can't detect a rename, but you control the producer, then have
 it write a file with a distinct name.

Now you've complicated up the transfer code just to avoid a delay loop. Technically, every bit of code will eventually fail. What happens if the transfer code bombs before it writes the .end file? I will say that in many years of using the delay loop mechanism with a 3 second delay, I've never had it fail on me.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Moving large PDF files with Applescript
      • From: "John C. Welch" <email@hidden>
    • Re: Moving large PDF files with Applescript
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: find a list item
  • Next by Date: Re: find a list item
  • Previous by thread: Re: find a list item
  • Next by thread: Re: Moving large PDF files with Applescript
  • Index(es):
    • Date
    • Thread