[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [MacPerl] Modify folder sort order settings?
At 7.58 -0400 1999.06.02, Kevin van Haaren wrote:
>I only need to do this once before I make the cd, so speed isn't a great
>issue, and I don't need to do it each time the folder is opened. I can
>take what Chris suggested and make it do what I want (although I was hoping
>for a more Perl solution, but whatever works 8-)
Well, then I was slightly confused. You don't need to do it in
AppleScript. Do you want to have the default sort order the same for every
folder? You can use this droplet:
#!perl -w
use File::Find;
use Mac::Files;
find(sub {
my $dir = $File::Find::name;
return unless -d $dir;
my $catinfo = FSpGetCatInfo($dir) or die "$dir: $^E";
my $dinfo = $catinfo->ioDrUsrWds or die "$dir: $^E";
$dinfo->frView(1);
$catinfo->ioDrUsrWds($dinfo);
FSpSetCatInfo($dir, $catinfo) or die $^E;
}, @ARGV);
In "frView(1)" put an integer corresponding to the view you want. I don't
know what numbers correspond to what views. 1 is icon, I think 2 is name.
You can figure it out by trial and error (I perused IM online and couldn't
find it).
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org