[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [MacPerl] beginner's q...



Try creating a droplet that looks like this:


#!perl -w

foreach $file (@ARGV)
{
    print $file," ->  ",join("/",MacPerl::GetFileInfo($file)),"\n";
}

That way you can drop several files on top of it at once and get information
on all of them. Four random files on my desktop produce:

Macintosh HD:Desktop Folder:Internet Explorer ->  MSIE/APPL
Macintosh HD:Desktop Folder:frontier.root (current) ->  LAND/TABL
Macintosh HD:Desktop Folder:MacPerl script template ->  McPL/TEXT
Macintosh HD:Desktop Folder:untitled ->  R*ch/TEXT

Note that frontier.root (current) is actually an alias to a file deep in the
depths of the hard drive someplace and is returning the type and creator of
the original file (aliases are like that).

-- Creede

> -----Original Message-----
> From: Nicholas.G.Thornton@directory.reed.edu
> [mailto:Nicholas.G.Thornton@directory.reed.edu]
> Sent: Thursday, August 05, 1999 1:42 AM
> To: macperl@macperl.org
> Subject: Re: [MacPerl] beginner's q...
> 
> 
> Nevermind about finding out Mime types, I figured that one 
> out :)  Some
> questions about prettying the script up though... When I run it I get
> "ttxtTEXT" or "McPLTEXT" etc. How can I change the output so 
> I get "TEXT/ttxt"?
> 
> #!perl
> print MacPerl::GetFileInfo(@ARGV);
> __END__
> 
> 
> nick
> 
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
> 

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org