• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Just returning Filename... not whole path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Just returning Filename... not whole path


  • Subject: Re: Just returning Filename... not whole path
  • From: Yvan KOENIG <email@hidden>
  • Date: Sat, 22 Oct 2005 01:49:31 +0200


Le 22 oct. 2005 , à 1:25, Brett Conlon/HU/AU/SonyDADC a écrit :

Hi Eric,

I don't know if it's the same for everyone but with this list, when you
respond, it only goes back to the sender, unless you manually include the
list address. I just responded to your email but it only went back to you.
So, I'm sending this to the list this time.


OK, after sending my last email I realised that I had set the fileName
value but not used it in the dialog. So I tried changing aFile to fileName
in the display dialogue line but it returned the following error:


Can't get name of alias "PATH TO FILE.PDF"

It does the same thing when I change it to (name of aFile).

I even tried changing aFile to (class of aFile) and it showed alias in the
dialogue.


I'm sure this means everything to those who know what they are doing but
for me... I don't know how to fix this.


Many thanks,

Cojcolds

Hello I will try to give an example.

property the_name : "exemples_cursives.rtf"
property the_path : "Macintosh HD:Users:yvankoenig:Desktop:" & the_name

tell application "Finder"
	set the_true_name to name of alias the_path
	(* this first one is OK, the reference is a full pathname *)

	set the_wrong_name to name of alias the_name
	(* this second one will fail, the reference is just a single name *)
end tell

When run, the history display:

tell application "Finder"
get name of alias "Macintosh HD:Users:yvankoenig:Desktop:exemples_cursives.rtf"
"exemples_cursives.rtf"
get name of alias "exemples_cursives.rtf"
"Erreur dans Finder : Impossible d’obtenir name of alias \"exemples_cursives.rtf\"."


Yvan KOENIG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Just returning Filename... not whole path (From: Brett Conlon/HU/AU/SonyDADC <email@hidden>)

  • Prev by Date: Re: Just returning Filename... not whole path
  • Next by Date: Re: Finding \t, \r, \n reliably
  • Previous by thread: Re: Just returning Filename... not whole path
  • Next by thread: Re: Just returning Filename... not whole path
  • Index(es):
    • Date
    • Thread