Re: Finder inconsistency (Was: What makes AppleScript difficult)
Re: Finder inconsistency (Was: What makes AppleScript difficult)
- Subject: Re: Finder inconsistency (Was: What makes AppleScript difficult)
- From: Emmanuel <email@hidden>
- Date: Fri, 7 Dec 2007 17:04:28 +0100
Title: Re: Finder inconsistency (Was: What makes
AppleScript diff
At 4:39 PM +0100 12/7/07, Skeeve wrote:
Emmanuel wrote:
On Dec 6, 2007, at 11:13 PM, Skeeve
wrote:
So you will replace a file that was
placed there by another application?
Bad idea! Very Bad!
My ยค0.02 on this: I usually recommend
that you include your app's name in the temporary file's
name.
I get the feeling, no one reads the
original post :-(
Apologies.
To sum it up
- There is a file "foo" in the original location
- It has to be copied as "bar" to the target destination
- There is no file named "bar" allowed in the original
location
so copy in original location, rename, move to target isn't an
option
- There is no file "foo" allowed in the target location
so copy to target and rename isn't an option either
This is most easily done with something like a
do shell script "mv " & original_foo &
" " & target_bar
Sure.
But there is no way to do it in a clean
way without "do shell script". At least I don't know of any.
I challenge you all to show me one.
filemove original_foo into file
target_bar
(this uses <duck>a Scripting Addition</duck>)
All the options shown yet are no clean
solutions because they have side effects like possibly destroying
another application's temporary files.
And I'm just lamenting that there is no
such way in Finder.
Ta-da, here comes Satimage-software with the dreadful Files.osax
to make it all possible!!!
Emmanuel
_______________________________________________
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