Finder weirdness
Finder weirdness
- Subject: Finder weirdness
- From: Walter Bushell <email@hidden>
- Date: Thu, 11 Nov 2010 12:55:54 -0500
Finder throws an error from the command it gets, which command runs by itself.
That is when I run the command that appears in the results and events window which throws an error, it runs. ?????
I think Finder is weird, better to do as much work as possible in Eunuchs.
I try
set x to (POSIX file "/Users/Walter/Music/YourBrain 000.pdf")
--tell application "QuickTime Player" to open x
tell application "Finder"
log x
my dostuff(x)
end tell
on dostuff(x)
set y to name of (info for x)
tell application "Finder"
set the name of x to "y" & text -7 thru -5 of y & ".pdf"
set name of x to "x" & text -7 thru -5 of name of x & ".pdf"
end tell
end dostuff
--------------
and get
---------
tell application "Finder"
(*file After Ewe:Users:Walter:Music:YourBrain 000.pdf*)
end tell
tell current application
info for file "After Ewe:Users:Walter:Music:YourBrain 000.pdf"
--> {name:"YourBrain 000.pdf", creation date:date "Sunday, March 15, 2009 7:53:38 PM", modification date:date "Sunday, March 15, 2009 7:53:38 PM", size:54474, folder:false, alias:false, package folder:false, visible:true, extension hidden:false, name extension:"pdf", displayed name:"YourBrain 000.pdf", default application:alias "After Ewe:Applications:Preview.app:", kind:"Portable Document Format (PDF)", file type:"