Creating new job folder with multi sub folders

Can anyone help with a script that will create folder with job name and number with subfolders Artwork,Proofs,Fonts,Print Files and then (this is where my script falls down) create subfolders within Print Files folder named jobnumber Inca/Vutek/HP Gren/Cheiftan/Icut.
First time applescripter so no laughing.

Cheers just

property subf_names : {“Artwork”, “Proofs”, “Fonts”, “Print Files”}
property subfff_names : {“Inca”, “Vutek”, “HP Gren”, “Chieftan”, “Icut”}


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
exit repeat
end repeat
set job_number to text -7 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 job_number & this_name
make new folder at main_folder with properties {name:temp_name}
end repeat

repeat with this_name in subfff_names
	set temp_name to job_number & this_name
	make new folder at folder main_folder with properties {name:temp_name}
end repeat

move (every folder of entire contents of main_folder whose name contains "Inca") to folder "Print Files" of main_folder

Hi,

nobody will laugh :slight_smile:
If you change two lines in the repeat blocks it should work:

repeat with this_name in subf_names
		set temp_name to job_number & this_name
		set subFolder to make new folder at main_folder with properties {name:temp_name} --> line changed: the last folder in the list must be "Print Files"
	end repeat
	
	repeat with this_name in subfff_names
		set temp_name to job_number & this_name
		make new folder at subfolder with properties {name:temp_name} -- line changed
	end repeat

This may help with the job number. Check that text returned is integers.

repeat
	set MyNumber to display dialog "Enter job number" default answer "0"
	try
		set j_number to (text returned of MyNumber) as integer
		exit repeat
	on error
		display dialog "Numbers only please!" with icon caution
	end try
end repeat

Fantastic, thanks stefan, cheers also mark but our job number starts with 2 letters, need to tweak slightly, then i will upload finished script for others.

Cheers
Just