Getting file info: type etc.
sarahr at genesearch.com.au
Thu Jun 27 19:11:01 EDT 2002
The "detailed files" gives all this sort of stuff. Check out the
Transcript dictionary for what each item in this list means and which
bits of data are available on which platforms. As you can only get a
detailed list for an entire folder, you need to do some work to get the
data for a single file.
answer file "Select a file"
put it into f -- this gives the full path to the file
set the itemDel to "/"
put item 1 to -2 of f into folderName -- get the name of the
put item -1 of f into shortF -- get just the file name without any
set the defaultFolder to folderName
put the detailed files into fList
replace "+" with space in fList -- this is needed on OS X, don't know
get lineOffset(shortF, fList)
put line it of fList into longF
-- gives something like this
-- Base convert.rev,5537,0,1021470011,1025188443,0,0,0,0,666,RevoRSTK
On Friday, June 28, 2002, at 05:51 AM, guy parkinson wrote:
> I've just started playing with Revolution; I'm experimenting by
> some tools I've written in applescript. Something I haven't been able to
> figure out in Revolution is how to get basic info on a file returned
> "answer file". Specifically I am looking for the file's type, but
> creation/modification dates etc are desirable as well. I know there's
> be a way.
> Guy Parkinson
> guy at centipede.ca
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode