Is there a way to select a folder of PDF’s and have it open a text edit file or a dialog box and give the height and width of each file? Text file would be better, as then it will be easier to take the smaller pdf and out them in one folder and move the larger ones to another.
I think you’ll have to ask Spotlight for that information.
property zelist : {}
set {astid, AppleScript's text item delimiters} to {"", "="}
set xpto to "Apps: books:Programming:Cooking:Pizzas"
tell application "Finder"
set zefiles to every document file of folder xpto
repeat with f in zefiles
tell me
set pp to POSIX path of file (f as text)
getdimensions(pp)
end tell
end repeat
end tell
set AppleScript's text item delimiters to astid
zelist as text --< have fun!!
------------
on getdimensions(f)
set s to do shell script "mdls -name kMDItemPageHeight -name kMDItemPageWidth " & quoted form of f
if s contains "null" then return
set s to every paragraph of s
set s to (item 2 of text items of item 1 of s) & " *" & (item 2 of text items of item 2 of s) & "= " & f & "
"
copy s to end of zelist
end getdimensions
I did get an error, as I don’t have the same path as you, so I changed your line starting with “Apps” to my path,which would be "set xpto to “Users:bpress:Desktop:pdf test for fiery 1”
"
But still getting an error that it cannot find it?