Re: .chk files
Re: .chk files
- Subject: Re: .chk files
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 25 Jan 2008 13:58:06 -0500
You've reached the point where there are so many "do shell script"
calls, you're better off (IMO) making the whole thing shell. Here's a
quick version that I haven't tested...
on Process(fileList)
set inputList to ""
repeat with f in fileList
set inputList to inputList & POSIX path of f & ASCII character 10
end repeat
do shell script "
export MAGICK_HOME=/usr/local
PATH=\"$PATH:$MAGICK_HOME/bin\"
while read f; do
if ext=\"$(identify -quiet -format %m \"$f\" |
tr A-Z a-z)"; then
case "$ext" in
jpeg) ext="jpg";;
pict) ext="pct";;
esac
case "$f" in *."$ext") continue;; esac
mv -n "$f" "${f%.*}.$ext"
fi
done <<'EOF'" & ASCII character 10 & inputList & "EOF"
end Process
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden