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

Re: [MacPerl-Modules] glue finder and alias references



At 5:07 PM -0500 8/12/99, Jefferson R. Lowrey wrote:
>I'm trying to do something somewhat simple - set the name of a folder using
>a Finder glue.
>
>Yes, I could do it other ways, including using perl commands (rename,
>maybe?), or File Manager routines.  But, honestly, I don't know how to use
>either of those things to change the name of a folder.  I *do* know how to
>do it using the Finder, though.


If this was a toy problem to play with the glue, then ignore
this post.


If you just need to rename a folder, you guessed right that
rename will do the trick:

#!perl
chdir "Macintosh HD:Desktop Folder:";
$oldName = "old jeep";
$newName = "new jeep";

rename( $oldName,$newName);
__END__



or you could do this:

#!perl
$oldName = "Macintosh HD:Desktop Folder:old jeep";
$newName = "Macintosh HD:Desktop Folder:new jeep";

rename( $oldName,$newName);
__END__


or this:
#!perl
rename ("Macintosh HD:Desktop Folder:old jeep",
        "Macintosh HD:Desktop Folder:new jeep"
);
__END__


-Eric



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