• 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: I've changed the name of a file - now how do I get at path to the new name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Len Senater <email@hidden>
  • Date: Fri, 3 Nov 2000 11:51:04 -0500

>on 11/2/00 9:26 PM, Len Senater at email@hidden wrote:
>
>> 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
>
>
>
>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
>
>return vPathName
>--> alias "Work:DMS Group:Database:NewFileName"
>
>John
>
>

almost perfect - however I start with

file "Work:DMS Group:Database:Test Images:OldFileName"

but I end up with

alias "Work:DMS Group:Database:Test Images:NewFileName"

FileMaker will not accept an alias reference - it must be a file reference

Can I easily turn one into the other?

Thanks,

LEN


  • Prev by Date: RE: Error -5190
  • Next by Date: Re: Forcing script to recognize application on startup disk.
  • Previous by thread: Thanks everybody
  • Next by thread: Re: I've changed the name of a file (etc.)
  • Index(es):
    • Date
    • Thread