Re: Panther bug: 'missing value' for modification date??
Re: Panther bug: 'missing value' for modification date??
- Subject: Re: Panther bug: 'missing value' for modification date??
- From: Graff <email@hidden>
- Date: Thu, 19 Feb 2004 12:51:51 -0500
If all else fails you should be able to use a shell script to
substitute:
-----------------
set theFile to choose file
set posixFile to quoted form of POSIX path of theFile
set theScript to "ls -l -T " & posixFile & " | awk '{ print $7 \" \" $6
\" \" $9 \" \" $8 }'"
set modTime to date (do shell script theScript)
display dialog modTime as string
-----------------
- Ken
On Feb 19, 2004, at 9:00 AM, Harald E Brandt wrote:
On Panther, as opposed to Jaguar, telling Finder to get the
modification date of a file on a mounted volume (belonging to another
computer) yields 'missing value' on first invocation, but gets the
date later on second invocation!? Why on earth is this so, and is
there any usable (fast) workaround?
Has this been reported? (I did not find any earlier report on this.)
Example: a volume is mounted fresh to my Mac OS 10.3.2 G4 computer
using 'Connect to Server'. The remote machine may also run 10.3, or
may be a 68k machine running some ancient 8.1. On my machine I issue:
tell application "Finder" to get modification date of file
"hd:Documents:a.p"
This yields 'missing value' on first invocation.
If I issue the command again, I get the date! I.e 2 invocations are
required!!.
(Subsequent requests also work of course, until the volume is ejected
and remounted whereupon the same error occurs.)
I tried the following workaround which does NOT work:
tell application "Finder"
try
get modification date of file "hd:Documents:a.p"
on error
get modification date of file "hd:Documents:a.p"
end try
end tell
I also tried doing an 'update' before getting the date, but also that
fails.
You may think that 'info for' would be a good workaround, but the
reason I want to use Finder is that it is so much faster (almost 5
times on a local volume, unless it's only a single request).
There's just got to be a solution, and a fast one, since I may process
thousands of files!
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.