Hi all,
In what I posted below (an abridged version of my script) I’m getting an error trying to set the variable theFilePath. I know it’s because the variable thePath is in the format “folder ‘Print_files’ of folder ‘examples’ of folder ‘test’ …”, instead of alias or string format. How can I get the path I want in the right format? Thanks.
on open theItems
tell application "Finder"
set theFile to item 1 of theItems
set theFilesContainer to container of theFile
try
set thePath to (make new folder at theFilesContainer with properties {name:"Print_files"})
on error --if Print_files already exists
set thePath to folder "Print_files" of theFilesContainer
end try
set {year:y, month:m, day:d} to (current date)
set theDate to (y * 10000 + m * 100 + d) as string
tell theDate to text 5 thru 6 & "." & text 7 thru 8 & "." & text 3 thru 4
set theDate to result
set theLogFile to theDate & "_ImposPrintLog.txt"
set theFilePath to thePath & theLogFile as string -- <--error
end tell
end open