Need help with creating subfolders

As it stands now I enter a project name, a folder is created and then 3 subfolders are created. I would like 4 additional folders created into one of the newly created subfolders and the only way I could figure out to do that is to have applescript ask for the correct subfolder. Is there any way to just have the four (1. through 4.) created automatically in the “3. Export” folder? The applescript I am currently working with:

tell application "Finder"
	set JobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
	set loc to choose folder "Choose Parent Folder Location"
	set newfoldername to JobName
	set newfo to make new folder at loc with properties {name:newfoldername}
	make new folder at newfo with properties {name:"1. Raw"}
	make new folder at newfo with properties {name:"2. Photoshop"}
	make new folder at newfo with properties {name:"3. Export"}
	set loc2 to choose folder "Choose Export Folder"
	make new folder at loc2 with properties {name:"1. HiRes"}
	make new folder at loc2 with properties {name:"2. HiRes Borderless"}
	make new folder at loc2 with properties {name:"3. Print (4x6)"}
	make new folder at loc2 with properties {name:"4. LowRes"}
end tell
end

Any help would be appreciated. Thanks!

Hi,

complex folder structures can be easily created with the shell mkdir command, the Finder is not needed.

set JobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
set loc to POSIX path of (choose folder with prompt "Choose Parent Folder Location")
set folderStructure to "/{'1. Raw','2. Photoshop','3. Export'/{'1. HiRes','2. HiRes Borderless','3. Print (4x6)','4. LowRes'}}"
do shell script "/bin/mkdir -p " & quoted form of loc & "/" & quoted form of JobName & folderStructure

But using the Finder it’s pretty easy without a second choose folder


 ...
set loc2 to make new folder at newfo with properties {name:"3. Export"}
make new folder at loc2 with properties {name:"1. HiRes"}
make new folder at loc2 with properties {name:"2. HiRes Borderless"}
make new folder at loc2 with properties {name:"3. Print (4x6)"}
make new folder at loc2 with properties {name:"4. LowRes"}

If I understand well you may try :

tell application "Finder"
	set JobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
	set loc to choose folder "Choose Parent Folder Location"
	set newfoldername to JobName
	set newfo to make new folder at loc with properties {name:newfoldername}
	make new folder at newfo with properties {name:"1. Raw"}
	make new folder at newfo with properties {name:"2. Photoshop"}
	set loc2 to make new folder at newfo with properties {name:"3. Export"} # EDITED
	--set loc2 to choose folder "Choose Export Folder" # DISABLED
	make new folder at loc2 with properties {name:"1. HiRes"}
	make new folder at loc2 with properties {name:"2. HiRes Borderless"}
	make new folder at loc2 with properties {name:"3. Print (4x6)"}
	make new folder at loc2 with properties {name:"4. LowRes"}
end tell

Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) samedi 14 janvier 2017 21:00:32

Thanks to everyone!