Re: Random number and filename
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.