• 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: Can't rename file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't rename file


  • Subject: Re: Can't rename file
  • From: Kai Edwards <email@hidden>
  • Date: Wed, 24 Jul 2002 01:27:49 +0000

on Tue, 23 Jul 2002 00:12:19 -0600, B&P <email@hidden> wrote:

> I am trying to run this script from Filemaker. It always returns a "can't
> set file to" message. The first part seems to work, but it will not rename
> the file - help!
>
>
> tell application "FileMaker Pro"
> set thevalue to cell "group_filename" of current record
> end tell
> tell application "Finder"
> set the name of file "thefile" to thevalue
> end tell

The Finder really needs some more information about the path to the actual
file - something like this:

--------------------------
tell application "Finder"
set the name of file "Macintosh HD:Desktop Folder:thefile" to thevalue
end tell
--------------------------

(Assuming, of course, that a file named "thefile" exists on the Desktop of a
disk called "Macintosh HD")

If you intended to use "thefile" as a variable, which refers to the required
file path, you'd need to take it out of the quote marks and store the path
information in it - something like this:

--------------------------
set thefile to "Macintosh HD:Desktop Folder:thefile"
tell application "Finder"
set the name of file thefile to thevalue
end tell
--------------------------

I'm afraid I don't know enough about what you're attempting to suggest the
best way of getting the relevant file path (either as a string or an alias)
- although it could be as simple as:

--------------------------
set thefile to choose file
tell application "Finder"
set the name of file thefile to thevalue
end tell
--------------------------

HTH.

Kai

--
email@hidden
email@hidden
_______________________________________________
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.

  • Prev by Date: Re: Ragtime
  • Next by Date: Re: Ragtime
  • Previous by thread: Can't rename file
  • Next by thread: Adjusting properties of container window
  • Index(es):
    • Date
    • Thread