Dumb Finder scripting question
Dumb Finder scripting question
- Subject: Dumb Finder scripting question
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 13 Dec 2007 22:04:33 -0500
OK, I have a list of files, all named *.avi. I want to go through and find out which ones don't already have a corresponding .mov file. In the shell, I could do this:
for f in $files; do
if [ ! -f "${f%.avi}.mov" ]; then ...
...
fi
done
I'm not sure what I'm trying to do is directly supported. If I have to fall back on using TID to split and rejoin the name, OK, but I was thinking there might be a way to take an alias, modify its target (
e.g. by changing the "name extension"), and then seeing if the result is still a valid file (probably via a try block that catches the exception thrown if it doesn't).
--
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