Getting file info: type etc.

Sarah sarahr at
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.

on mouseUp
   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 
containing folder
   put item -1 of f into shortF  -- get just the file name without any 
folder names

   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 
about others

   get lineOffset(shortF, fList)
   put line it of fList into longF

   put longF
   -- gives something like this
   -- Base convert.rev,5537,0,1021470011,1025188443,0,0,0,0,666,RevoRSTK
end mouseUp


On Friday, June 28, 2002, at 05:51  AM, guy parkinson wrote:

> I've just started playing with Revolution; I'm experimenting by 
> rewriting
> 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 
> from
> "answer file". Specifically I am looking for the file's type, but
> creation/modification dates etc are desirable as well. I know there's 
> gotta
> be a way.
> guy
> ----------------
> Guy Parkinson
> Centipede
> 416-421-4855
> guy at
> ----------------
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the Use-livecode mailing list