Re: Renaming a file...
Re: Renaming a file...
- Subject: Re: Renaming a file...
- From: Doug McNutt <email@hidden>
- Date: Fri, 17 May 2002 08:51:13 -0600
At 11:02 +0200 5/17/02, Monsoft wrote:
>
set myDuplicateFile to duplicate file myFile to folder myFolder
>
-- work fine
>
set the name of the file myDuplicateFile to myNewName
>
-- I'm enable to rename the file!
Allow me to guess. If I'm right perhaps I can say I'm finally getting this English dialect.
myDuplicateFile is in the form of a file alias - one way of specifying a file. It gets created by your first command.
The words "file myDuplicateFile" include the reserved word "file" that suggests to AppleScript that what follows is not an alias but rather is the name of the file as text even though it's not in quotes. That creates - in natural English phraseology - a type mismatch.
There are known differences in MacOS neXt with regard to aliases.
I would try one of these:
set the name of myDuplicateFile to myNewName
Please set the name of myDuplicateFile to myNewName
But I'll bet there are still things I don't understand and the above may well be all screwed up.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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.