Applescript to copy file from mounted Google Team Drive

0
down vote
favorite
I am trying top copy a folder on a google Team drive to another location but my script keeps getting an error. The full script is at the end.

I basically want to copy an excel file “Google Drive:Team Drives:Company -Sync Folder:0000-1_E.xlsx” to a location that is defined by the script

duplicate file “Team Drives:Company -Sync Folder:0000-1_E.xlsx” of disk to folder (jobNum & " Documents") of newJobFolder

Any help would be appreciated.

global jobNum
global newJobFolder
set jobNum to text returned of (display dialog “Enter a job number:” default answer “”)
set jobName to text returned of (display dialog “Enter a job name:” default answer “”)
set jobMgr to text returned of (display dialog “Enter account manager email:” default answer “”)
set folderpath to (choose folder with prompt “Select client folder”)
set newJobFolder to my newFold(jobNum, jobName, folderpath, jobMgr)

on newFold(theNumber, theName, thefolder, jobMgr)
set emailAddress to jobMgr
set emailSubject to theNumber & " -" & theName
set bodyText to “”
set emailLinkFileName to theNumber & " -" & theName

set subNameList to {"Designs", "Documents", "Received"}
set itemCount to count of subNameList
set linkBody to "mailto:" & emailAddress & "?subject=" & my replace_chars(emailSubject, " ", "%20") & "&body=" & my replace_chars(bodyText, " ", "%20")
tell application "Finder"
	set newJobFolder to (make new folder at thefolder with properties ¬
		{name:theNumber & " " & theName})
	repeat with i from 1 to itemCount
		set aSubFolder to make new folder at newJobFolder with properties {name:jobNum & " " & item i of subNameList}
		set theMailto to make new internet location file to linkBody at aSubFolder with properties {name:emailLinkFileName, name extension:"mailloc"}
		set the name extension of theMailto to "mailloc"
	end repeat
	duplicate file "Team Drives:Company -Sync Folder:0000-1_E.xlsx" of disk to folder (jobNum & " Documents") of newJobFolder
	set name of the result to jobNum & " E.xlsx"
	set theMailto to make new internet location file to linkBody at newJobFolder with properties {name:emailLinkFileName, name extension:"mailloc"}
	set the name extension of theMailto to "mailloc"
end tell

end newFold

– Generic find and replace functionality
on replace_chars(this_text, search_string, replacement_string)
set AppleScript’s text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript’s text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript’s text item delimiters to “”
return this_text
end replace_chars