• 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: Renaming a file...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Renaming a file...
      • From: Monsoft <email@hidden>
References: 
 >Renaming a file... (From: Monsoft <email@hidden>)

  • Prev by Date: Re: Is it possible to set the hard disk name in a path
  • Next by Date: Re: deep archives
  • Previous by thread: Renaming a file...
  • Next by thread: Re: Renaming a file...
  • Index(es):
    • Date
    • Thread