• 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
"set name" not working - newbie question -urgent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"set name" not working - newbie question -urgent


  • Subject: "set name" not working - newbie question -urgent
  • From: "Tracy Vanderwerf" <email@hidden>
  • Date: Fri, 12 Apr 2002 12:27:27 -0400
  • Organization: White Directory Publishers

I am trying to rename a file. This works outside of my script, which has

a run handler. My code is in a subroutine that is using Stuffit
Expander. After my file is expanded, it has the name 41275.A.1 (I have
trashed the original 41275.A prior to this). I want to rename the
expanded file to 41275.A. I am getting an error on selecting the folder
fileContainer. As I said, this works fine outside the script:

if got_new_expandpath then
getcontainer2(save_filepath)
display dialog "fileContainer = " & fileContainer
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set COPY_ARTID to the last text item of new_expandpath as string
set AppleScript's text item delimiters to oldDelimiters
display dialog "after setting text item COPY_ARTID = " &
COPY_ARTID
tell application "Finder"
try
select folder fileContainer
select file COPY_ARTID of folder fileContainer
set name of selection to ARTID
on error
display dialog "error on select "
end try
end tell
end if


Thanks in advance for your help. (MAC OS 9.0.4, AppleScript 1.4.3)

[demime 0.98b removed an attachment of type text/x-vcard which had a name of tvanderwerf.vcf]
_______________________________________________
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.

  • Follow-Ups:
    • Re: "set name" not working - newbie question -urgent
      • From: "Tracy Vanderwerf" <email@hidden>
  • Prev by Date: disconnect external volumes
  • Next by Date: RE: applescript-users digest, Vol 3 #346 - 12 msgs
  • Previous by thread: Re: disconnect external volumes
  • Next by thread: Re: "set name" not working - newbie question -urgent
  • Index(es):
    • Date
    • Thread