in the below script i trying to determine if the inputed path points to a folder by checking:
folder of file_info -> should return true/false
but when trying this the script gives and error and stops.
but other values work fine example:
size of file_info -> return size incase of folder its "missing value"
someone knows why this doest work? i have seen other scripts where people use it, but no one seems to get this error
on log_event(themessage)
set theLine to (do shell script "date +'%Y-%m-%d %H:%M:%S'" as string) & " " & themessage
do shell script "echo " & theLine & " >> ~/Library/Logs/tvshowscript-events-test.log"
end log_event
tell application "Finder"
set str to "Macintosh HD:Users:"
set the_item to str as alias
set file_info to get info for the_item
my log_event("-------------- " & size of the file_info)
my log_event("-------------- " & kind of the file_info)
my log_event("-------------- " & folder of the file_info)
end tell
Try removing the lines
tell application "Finder"andend tell.