Re: Moving large PDF files with Applescript
Re: Moving large PDF files with Applescript
- Subject: Re: Moving large PDF files with Applescript
- From: "Stockly, Ed" <email@hidden>
- Date: Wed, 01 Apr 2009 13:12:59 -0700
- Thread-topic: Moving large PDF files with Applescript
>>Yvan>> I use for years a handler like the one which I sent. I never got any
problem with it.
Don't know about the OP, but I can't use that. The files are being uploaded
to a drop box on a remote unix server where our access is limited. We can
copy files to the server, but once they're there we can't rename, move or
delete.
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.
The problem is these are large files and I don't wan't to read an entire 10
meg file just to get to the last graph. So I tried getting the size of the
file, and reading the last 20 characters, didn't work, but reading the last
300 characters did. I believe the difference was in resource fork.
I'm guessing that the only resources sit/zip/pdf files will have are icons
which have fixed size, so I'm hoping I can do something like this:
tell application "Finder"
set fileSize to size of file thisPath
set physSize to physical size of file thisPath
end tell
set startPoint to (fileSize div 1) - 500
set fileText to read file thisPath from startPoint
if eofTag is in the last paragraph of fileText then
set the end of filesToMove to thisPath
end if
But I'd feel a lot more confident if I knew for certain how big the resource
fork was. Is there a way to get the size of the resource fork?
ES
_______________________________________________
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