Fwd: Re : Renaming file bug
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