View Single Post

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