• 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
Fwd: Re : Renaming file bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Re : Renaming file bug


  • Subject: Fwd: Re : Renaming file bug
  • From: JM <email@hidden>
  • Date: Mon, 13 Dec 2004 10:15:17 +0100

I have wrote a script which works fine except a strange thing... I have this
simple command line :

tell application "Finder"
set the name of ThisFile to ThisName
end tell

This command line works fine when the window of the folder containing the file
is open in the Finder, and it doesn't works anymore when this window is closed
!

Hi JM.

Can you tell us what exactly is stored in the variable 'ThisFile'? Is it an
alias ( alias "Diskname:Foldername:Filename"), or a reference (file
"Filename" of folder "Foldername" of disk "Diskname" of application
"Finder"), or something else... ?

If 'ThisFile' is an alias or reference, you should be able to set the name
of the file that it points to regardless of whether or not the window is
open

Nick
pp Mr Tea

--
Thank you Nick for your answer,
In fact here is the detail of my code :

tell application "Finder"
set ThisFile to make new file in ThisFolder
-- later
set the name of ThisFile to ThisName
end tell

I just tried :
tell application "Finder"
set ThisFile to make new file in ThisFolder
set FileRef to ThisFile as alias
-- later
set the name of FileRef to ThisName
End tell
... With no success either ! It works fine when the window is open and it doesn't when the window is closed !
Do you have an idea ?
Thanks
JM

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Re : Renaming file bug
      • From: Mr Tea <email@hidden>
    • Re: Re : Renaming file bug
      • From: Roger Howard <email@hidden>
  • Prev by Date: Re: Getting content of an HTML message in Mail
  • Next by Date: Re: Another way to open files? (Droplet script with Canon Canoscan Toolbox)
  • Previous by thread: Re: Another way to open files? (Droplet script with Canon Canoscan Toolbox)
  • Next by thread: Re: Re : Renaming file bug
  • Index(es):
    • Date
    • Thread