Re: Dumb Finder scripting question
Re: Dumb Finder scripting question
- Subject: Re: Dumb Finder scripting question
- From: Laine Lee <email@hidden>
- Date: Fri, 14 Dec 2007 13:17:05 -0600
- Thread-topic: Dumb Finder scripting question
On 12/13/07 9:04 PM, "Mark J. Reed" <email@hidden> wrote:
> 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).
You mean something based on a construct like this?
set displayed_name to (text items 1 thru -5 of "moviefile.avi") as Unicode
text?
Or is that precisely what you're trying to avoid?
--
Laine Lee
_______________________________________________
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