File Types and Creator Codes
Richard Gaskin
ambassador at fourthworld.com
Thu Sep 24 12:56:04 EDT 2009
Ray Horsley wrote:
> Anybody know how to determine these? In particular, I need the file
> type and creator for zip files.
In RevNet's Stack's section is a file named "4W File Typer" which lets
you drop files onto it to view and change the type and creator code.
You can get to RevNet from inside Rev: Develop->Plugins->GoRevNet
Here's the script which obtains the creator code info, using "the
detailed files" in which each line returned as a number of
comma-separated elements and item 11 is the combined creator and type:
on dragDrop
get line 1 the dragData
if it is not empty then
put it into fld "file"
put it into tDir
set the itemdel to "/"
put last item of it into tFileName
delete last item of tDir
put the directory into tSaveDir
set the directory to tDir
put the detailed files into tFiles
set the directory to tSaveDir
put line lineoffset(urlEncode(tFileName), tFiles) of tFiles into
tFileData
set the itemdel to comma
get item 11 of tFileData
put char 1 to 4 of it into fld "creator"
put char 5 to 8 of it into fld "type"
end if
end dragDrop
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge: Publish any database on any Web site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list