"set name" not working - newbie question -urgent
"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.