I have this script that goes through a folder and all subfolders to open and resave each file (they’re TIFFs) with LZW compression and with byte order for IBM PC.
I would like to have the script only resave files that are 1mb or larger instead of doing every file. I’m a real newbie with applescript so any help would be appreciated.
Thanks!
on run
tell application "Finder"
set sourcePath to choose folder with prompt "Please select SOURCE folder:"
set savePath to choose folder with prompt "Please select DESTINATION folder:"
set fileList to (files of entire contents of sourcePath) as alias list
end tell
repeat until fileList = {}
set FilePath to item 1 of fileList as alias
tell application "Adobe Photoshop CS3"
open FilePath
save document 1 in FilePath as TIFF with options {class:TIFF save options, byte order:IBM PC, image compression:LZW} appending lowercase extension
close document 1
end tell
set fileList to rest of fileList
end repeat
end run