Re: I've changed the name of a file - now how do I get at path to > the new name?
Re: I've changed the name of a file - now how do I get at path to > the new name?
- Subject: Re: I've changed the name of a file - now how do I get at path to > the new name?
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 03 Nov 2000 01:29:00 -0500
- Organization: [very little]
Len Senater wrote:
>
Subject: I've changed the name of a file - now how do I get at path to
>
the new name?
>
Date: Thu, 2 Nov 2000 21:26:35 -0500
>
From: Len Senater <email@hidden>
>
To: <email@hidden>
>
>
I've got a variable (vPathName) that contains a reference (i.e. path) to
>
a file:
>
>
--> file "Work:DMS Group:Database:Test Images:xxx.jpg"
>
>
I can change the name of the file by:
>
>
set the name of vPathName to "NewFileName"
>
>
great, however the variable still contains the path to the old file name.
>
>
How do I get the path to the newly renamed file?
>
>
I need it to put back into the database (FileMaker) where I got the
>
original pathname, so that it will point to the correct (i.e. renamed)
>
file.
>
>
Thanks,
>
>
LEN
If you make vPathName an alias reference, it'll still point to the file
after you change the name:
tell application "Finder"
set vPathName to (file "Work:DMS Group:Database:Test
Images:xxx.jpg") as alias
set the name of vPathName to "NewFileName"
end tell
vPathName -- alias "Work:DMS Group:Database:Test Images:NewFileName"
Marc [11/3/00 1:26:48 AM]