Re: Help with applescript creating folders
Re: Help with applescript creating folders
- Subject: Re: Help with applescript creating folders
- From: Tim Rycroft <email@hidden>
- Date: Mon, 06 Aug 2007 10:24:16 +0100
- Thread-topic: Help with applescript creating folders
Title: Re: Help with applescript creating folders
This scrip is great thank you. I’ve been asked to add an extra feature into the script!
Is it possible to copy an illustrator file from a central location and paste it into Stage 1 Folder and rename the file to the same name as the job name and number that you manually enter in?
Also are you able to set the permissions on the folders that you create or is that too complex to do and not worth it?
Thank you so much for your help.
Tim
On 3/8/07 17:28, "Mark J. Reed" <email@hidden> wrote:
Oh, and since this is a shell scripting list :), here's how to do it with "do shell script":
property subf_names: { "Design/Stage 1", "Based On", "Artwork" }
--
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 ("00000" & 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
end tell
repeat with child in subf_names
do shell script "cd " & quoted form of posix path of main_folder & "; mkdir -p " & quoted form of child
end repeat
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