Editing a script

Joined
Jan 17, 2012
Messages
1
Reaction score
0
Points
1
HI,

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.

[Folder_Name]

With in Folder_name are five folders

Concept
Design
Reference
LR_Proofs(Jpegs/PDFS)
Supplied

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"}


repeat
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:"
try
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



Thanks
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top