Re: Renaming a file...
Re: Renaming a file...
- Subject: Re: Renaming a file...
- From: Monsoft <email@hidden>
- Date: Fri, 17 May 2002 19:48:39 +0200
le 17/05/02 16:51, Doug McNutt ` email@hidden a icrit :
>
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.
_______________________________
You're right!
"the file" was superfluous and toxic!!
set the name of the file myDuplicateFile to myNewName -> error
set the name of myDuplicateFile to myNewName -> OK
however it's a file... I'm not at ease with english grammar. Thanks.
Laurent Wallard
_______________________________________________
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.