Re: Moving large PDF files with Applescript
Re: Moving large PDF files with Applescript
- Subject: Re: Moving large PDF files with Applescript
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 1 Apr 2009 13:57:46 -0400
On Wed, Apr 1, 2009 at 1:47 PM, John C. Welch
<email@hidden> wrote:
That's assuming the only way to use the timing loop is to check for
increases.
That's what the code posted so far has done.
The obvious solution here is to compare the current size of the
written file to the known size of the complete file.
Great! Where do we find out this "known" size of the complete file? How do we convey that information to the receiving process? Writing another file ahead of time with the size of the data file in it doesn't seem to be any improvement over the '.end' file technique.
> 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.
That's complicating things even more.
You're going to get failures and have to deal with them somehow no matter what. The .end file technique leaves the system in a known state in the face of failures, rather than with something trying to process an incomplete file.
Dealing with failures does complicate things, but it doesn't OVERcomplicate them. Everything should be "as simple as possible - and no simpler".
Code that requires manual intervention or additional verification and
cleanup processes isn't exactly exciting either.
Any automated process of any useful level of complexity is going to require some level of checking up, manual or otherwise. What's important here is that the .end file technique gives any failures a *smaller* impact than the timing loop, and so can go longer without anyone having to worry about that stuff, on average.
--
Mark J. Reed <
email@hidden>
_______________________________________________
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