Saving in specific folder

Below is a script that I am working to automate the creation of a quark document.
It prompts for a job number, then opens a template file and imports images to page 1, 2, and 3, based on the job number.
The files that I am importing are on one server… the location that I want to save the current document to is on a different server.
Once I have the files imported, can someone help me with the syntax of the save statement to save the document as the name
(jobNum & “proof”) into a folder whose name begins with (jobNum) in the folder “work files” on the disk “Art Department”
What I have below gives me a syntax error.

thanks
david

tell application "Finder"
	set myDialog to display dialog "Job:" default answer "0" buttons {"Cancel", "OK"} default button 2
	set jobNum to text returned of myDialog
	
	--open file (jobNum & "art.pdf") of (folder jobNum of disk "Central PDF Proofs")
	
	set aArtPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "ART.pdf" as string
	set aBCPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "BC.pdf" as string
	set aSheetPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "-01Sheet.pdf" as string
	
end tell

tell application "QuarkXPress"
	
	tell application "Finder" to open ("artdept2x:users:admin:desktop:PDF-GENERIC")
	activate
	tell front document
		tell page 1
			make picture box at beginning with properties {polygon points:{{".93\"", "0\""}, {".93\"", "2.15\""}, {"0\"", "2.15\""}, {"0\"", "8.5\""}, {"4\"", "8.5\""}, {"4\"", "0\""}}}
			tell picture box 1
				set image 1 to file aArtPdf
			end tell
		end tell
		tell page 2
			make picture box at beginning with properties {polygon points:{{".93\"", "0\""}, {".93\"", "2.15\""}, {"0\"", "2.15\""}, {"0\"", "8.5\""}, {"5\"", "8.5\""}, {"5\"", "0\""}}}
			tell picture box 1
				set image 1 to file aBCPdf
			end tell
		end tell
		tell page 3
			make picture box at beginning with properties {bounds:{"0\"", "0\"", "11\"", "8.5\""}}
			tell picture box 1
				set image 1 to file aSheetPdf
			end tell
		end tell
	end tell
	save document 1 as (jobNum & "proof") in the first folder whose name begins with jobNum in the folder " Work Files" of the disk "Art Department" 
	
end tell

I think I would define the folder in the Finder just following the entry of the Job number:

tell application "Finder" to set F to the first folder whose name begins with jobNum in the folder " Work Files" of the disk "Art Department" as alias

Then when you save the template, just save it in F

Hmmm… when I try that statement, I get the error:

“Can’t make jobNum of «class cfol» " Work Files” of «class cdis» “Art Department” of application “Finder” into type alias.

I’m guessing it isn’t seeing jobNum as a string possibly?

Thanks
David

Hi,

this syntax can’t work, try this

tell application "Finder" to set F to (first folder of folder " Work Files" of disk "Art Department" whose name begins with jobNum) as alias