Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Perl on OSX > Re: Mac OS alia...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 1022 of 1076
Post > Topic >>

Re: Mac OS alias from Perl

by peter@[EMAIL PROTECTED] (Peter N Lewis) Dec 9, 2007 at 08:11 PM

At 19:01 -0500 8/12/07, Dan Neville wrote:
>Does anyone know how to make a Mac OS alias in Perl?  So, I wish to 
>have Perl create aliases in multiple directories rather than copy 
>the original file.

There actually is no API call to create an alias file.

You can do it in Perl as described at

<http://use.perl.org/~pudge/journal/10437>

Alternatively, you can make a new alias via AppleScripting the Finder as:

set thaAlias to "Harddisk:Users:peter:thefile.cpp" as alias

tell application "Finder"
	set f to make new alias file at desktop to thaAlias
end tell
f

Which will return the alias file created.

Enjoy,
    Peter.

-- 
Keyboard Maestro <http://www.keyboardmaestro.com/>
Macros for your Mac
<http://www.stairways.com/>
          <http://download.stairways.com/>
 




 5 Posts in Topic:
Mac OS alias from Perl
dneville@[EMAIL PROTECTED  2007-12-08 19:01:46 
Re: Mac OS alias from Perl
peter@[EMAIL PROTECTED]   2007-12-09 20:11:12 
Re: Mac OS alias from Perl
douglist@[EMAIL PROTECTED  2007-12-09 12:30:04 
Re: Mac OS alias from Perl
pudge@[EMAIL PROTECTED]   2008-03-11 22:58:48 
Re: Mac OS alias from Perl
brian.d.foy@[EMAIL PROTEC  2007-12-09 21:39:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 0:11:09 CST 2008.