Re: Help with applescript creating folders
Re: Help with applescript creating folders
- Subject: Re: Help with applescript creating folders
- From: "Houston, Brad" <email@hidden>
- Date: Fri, 03 Aug 2007 09:06:32 -0700
- Thread-topic: Help with applescript creating folders
Title: Re: Help with applescript creating folders
Hi Tim,
I’m not a master scripter as some here seem to be, but looking at your code I note that though you set design_folder to new_folder, in the subsequent script you make new folder at new_folder, which would be the last value of new_folder; “Artwork”. Just change that line to make new folder at design_folder.
Brad
On 8/3/07 8:55 AM, "Tim Rycroft" <email@hidden> wrote:
Hi,
Thank you for replying.
This script kind of works... It sends the stage 1 folder into the wrong folder. It sends the Stage 1 folder into the Artwork folder instead of the Design folder. Any other thoughts?
property subf_names : {"Design", "Based On", "Artwork"}
property subg_names : {"Stage 1"}
--
display dialog "Enter job name:" default answer "job name"
set j_name to text returned of result
repeat
display dialog "Enter job number:" default answer "0"
set j_number to text returned of result
try
if (j_number as integer) < 100000 and ¬
(j_number as integer) > -1 then exit repeat
on error
display dialog "Error: enter an integer less than 100,000."
end try
end repeat
set job_number to text -6 thru -1 of ("0000" & j_number & "_")
set temp_name to job_number & j_name
tell application "Finder"
set main_folder to (make new folder at desktop with properties ¬
{name:temp_name}) as alias
repeat with this_name in subf_names
set temp_name to this_name
set new_folder to (make new folder at main_folder with properties {name:temp_name})
if temp_name is "Design" then set design_folder to new_folder
end repeat
end tell
tell application "Finder"
set chosen_folder to job_number & j_name
repeat with this_name in subg_names
set temp_name to this_name
make new folder at new_folder with properties {name:temp_name}
end repeat
end tell
On 3/8/07 16:34, "Michelle Steiner" <email@hidden> wrote:
On Aug 3, 2007, at 8:23 AM, Tim Rycroft wrote:
Can anyone help me please?
I haven't tested it, but this should work:
tell application "Finder"
set main_folder to (make new folder at desktop with properties ¬
{name:temp_name}) as alias
repeat with this_name in subf_names
set temp_name to this_name
set new_folder to (make new folder at main_folder with properties {name:temp_name})
if temp_name is "Design" then set design_folder to new_folder
end repeat
end tell
tell application "Finder"
set chosen_folder to job_number & j_name
repeat with this_name in subg_names
set temp_name to this_name
make new folder at design_folder with properties {name:temp_name}
end repeat
end tell
--
If you're not going somewhere, you're not getting anywhere.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Thanks
Tim Rycroft
I.T. Support Executive
ANTHEM
A Schawk Strategic Design Company
Haxby Road
York YO31 8TA
T +44 (0) 1904 605721
M +44 (0) 7730 077739
I +44 (0) 1904 610891
Anthemworldwide.com
This e-mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this e-mail message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is prohibited. If you have received this e-mail in error, please notify us immediately by telephone at +44 (0)1904 605886 and also indicate the sender’s name. Thank you.
P Please consider the impact to the environment and your responsibility before printing this e-mail.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden