Re: Dumb Finder scripting question
Re: Dumb Finder scripting question
- Subject: Re: Dumb Finder scripting question
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 14 Dec 2007 21:13:02 -0500
On Dec 14, 2007 8:44 PM, Michelle Steiner <
email@hidden> wrote:
What versions of the OS and Applescript are you using?
OS X 10.5.1, AppleScript 2.0, Script Editor 2.2
And are you actually using those pipes around those properties?
Hi, have we met? I'm Mark. :) I know this was a pretty basic question, Finder-scripting-wise, but I
thought I had enough of a rep on here to get *some* benefit of the doubt
as far as overall cluefulness.
No, I did not use pipes. And if I had, I would have noticed the "cannot get |extension hidden| of blah" or whatever error dialog, and would have tracked that down before simply reporting tersely that your technique "doesn't work". The pipes were just by way of quoting within my message text; I'm kind of a fan of the whole use/mention distinction. I should have just stuck with quotes, but then you might have asked if I really used the quotes, so it might not have helped. Parens! I'll use parens.
Anyway, here's the script I used to test:
tell application "Finder"
set aviFiles to (get files of entire contents of folder "Wazowski:Users:mreed:Documents:My Flip Video Library" whose name extension is "avi")
set aFile to first item of aviFiles
set flag to extension hidden of aFile
set extension hidden of aFile to true
set rootName to displayed name of aFile
set extension hidden of aFile to flag
end tell
rootName
The result: "Nov 04 2007 - VID00010.AVI"
Laine also said something in this thread about that technique not working reliably anymore. It's apparently sensitive to the specific extension?
In any case, (text 1 through -5 of name) works well enough.
--
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