• 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: Random number and filename
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random number and filename


  • Subject: Re: Random number and filename
  • From: JollyRoger <email@hidden>
  • Date: Tue, 26 Feb 2002 09:54:48 -0600

On 2/26/2002 5:05 AM, "email@hidden" <email@hidden>
wrote:

> set fileName of myfile to (x & ".doc" as string)

"myfile" is an alias. There is no "fileName" property in the alias class.

It kind of looks like you are shooting in the dark here. If you want to
change the name of a file, you need to use the appropriate property of the
appropriate class.

Open the Finder dictionary by choosing File > Open dictionary in your script
editor. In the Finder dictionary under "Finder Items", notice that there is
a class called "item". One of the properties of this class is "name". So
to set the name of a Finder item, you would:

tell application "Finder" to set the name of (file aFile) to newFilename

HTH

JR
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Random number and filename (From: email@hidden)

  • Prev by Date: Re: string literals passwords in run only applications
  • Next by Date: Re: Lengthy Operation In Progress...
  • Previous by thread: Re: Random number and filename
  • Next by thread: Why are these different?
  • Index(es):
    • Date
    • Thread