Re: Moving large PDF files with Applescript
Re: Moving large PDF files with Applescript
- Subject: Re: Moving large PDF files with Applescript
- From: "John C. Welch" <email@hidden>
- Date: Wed, 01 Apr 2009 16:37:55 -0400
- Thread-topic: Moving large PDF files with Applescript
On 4/1/09 4:17 PM, "John Welch" <email@hidden> wrote:
>> I'm still looking at reading the eof code for PDFs (or in my case zip or sit
>> files) to determine if a file is ready.
Didn't find anything consistent for eof on zips, but sit/sitx files are
somewhat consistent.
They seem to use a string that starts with " 1;2c" (the space is important"
and may have traiing repetitions of 1;2c, i.e.: "
1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c1;2c", but it always starts with " 1;2c" and
always ends with ";2c"
.sitx files can have odd characters in the middle, like
";1;1;112;112;1;0x1;2c1", but that start and end are pretty solid. Just make
sure you check for the space at the beginning, because you can get those
characters at random in other places, but I've not seen them occur with the
space anywhere else. I think if you set up a grep that looked for a string
that starts with " 1:2c" with either the EOL/EOF character immediately
afterwards, or with the ";2cEOL/EOF" ending it, you'll be fine. Note that
the EOL doesn't seem to occur in the middle.
Also note, this is entirely based on using cat against the files. If you
look at them in BBEdit, or with some other utility, you may get a different
result, so don't be too blasé' in using this.
--
"Again, in basic training we had been forbidden to say please or thank you,
as such words implied the existence of kindness, benevolence, or charity."
- Mouthful of Rocks, by Christian Jennings, about Foreign Legion boot camp.
_______________________________________________
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