New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Editing a script

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jan 17, 2012
Posts: 1
productionman is on a distinguished road

productionman is offline

I have a script that creates a job folder which has a number of named folders within it, I'm trying to add more folders to this but having trouble editing the script correctly. Below is the folder layout and in red are the folders I'm trying to create.


With in Folder_name are five folders


Within Design I have a stg1 folder and with in that I want two new folders (PSD, Vector) this is where I'm having trouble.

the script is below if someone could help me out id really appreciate it.

property newFolderName : "Client_Folder"
property mainSubFolderNames : {"Supplied", "Concept", "Design", "Copy", "Reference", "LR_Proofs_(PDFs/JPEGS)"}
property DesignSubFolderNames : {"Stg_1"}
property ConceptSubFolderNames : {"Stg_1"}

display dialog "Enter job number:" default answer ""
set jobNumber to text returned of result
if result is not "" then exit repeat
end repeat

choose folder with prompt "Create job folder '" & jobNumber & "' _in this folder:"
tell application "Finder"
make new folder at result with properties {name:(jobNumber & newFolderName)}
set jobFolder to result as alias

repeat with i from 1 to (count mainSubFolderNames)
make new folder at jobFolder with properties {name:(jobNumber & (item i of mainSubFolderNames))}
end repeat

repeat with i from 1 to (count DesignSubFolderNames)
make new folder at ((jobFolder as text) & jobNumber & "Design:") as alias with properties {name:(jobNumber & "" & (item i of DesignSubFolderNames))}
end repeat

repeat with i from 1 to (count ConceptSubFolderNames)
make new folder at ((jobFolder as text) & jobNumber & "Concept:") as alias with properties {name:(jobNumber & "" & (item i of ConceptSubFolderNames))}
end repeat
end tell

on error errorMsg number errorNum
display dialog "Error: (" & errorNum & "):" & return & return & errorMsg buttons "Cancel" default button 1
end try

QUOTE Thanks

Post Reply New Thread Subscribe

« shortcut, for example, my email address? | Slightly Better authorization sample fails only in Leopard »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Mapping AFP with Applescript for student macs DrunkMunki OS X - Operating System 3 11-04-2011 02:23 AM
Script for Zoom in MS Office Word 2008 or 2011 Lbatson21 OS X - Apps and Games 1 10-31-2011 10:39 PM
Script to duplicate Apple Lossless iTunes library as MP3 files nick_harambee OS X - Operating System 10 10-02-2010 08:53 AM
need help to amend a script so that it only runs if iTunes is running nick_harambee OS X - Operating System 1 07-20-2009 11:15 AM
apple script to greet me off stand by jakeroberts OS X - Development and Darwin 0 04-29-2007 12:34 PM

All times are GMT -4. The time now is 09:08 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?