Re: move with System Events
Re: move with System Events
- Subject: Re: move with System Events
- From: "koenig.yvan" <email@hidden>
- Date: Sun, 24 Nov 2013 10:08:03 +0100
Le 24/11/2013 à 06:40, Shane Stanley < email@hidden> a écrit : On 24 Nov 2013, at 3:13 AM, koenig.yvan < email@hidden> wrote: In Mavericks, the function move a disk item is no longer flagged as UNAVAILABLE YET :
FWIW, by using an ASObjC-based library you can be free of the quirks and foibles of System Events and the Finder for much of your file management. For example:
use framework "Foundation"
on moveFileAt:POSIXPath toFolder:folderPOSIXPath set POSIXPath to current application's NSString's stringWithString:POSIXPath set theName to POSIXPath's lastPathComponent() set folderPOSIXPath to current application's NSString's stringWithString:folderPOSIXPath set theNewPath to folderPOSIXPath's stringByAppendingPathComponent:newName set fileManager to current application's NSFileManager's defaultManager() set theResult to fileManager's moveItemAtPath:POSIXPath toPath:theNewPath |error|:(missing value) return (theResult as integer = 1) end moveFileAt:toFolder:
Thanks to all of you.
I'm aware of the ASCObjC Runner features. I'm slowly discovering the library feature.
But here I was just trying to know if I was doing something wrong or if there is a bug in System Events.
Like Deivy I tried with POSIX path and got the same behavior.
I will file a bug report.
All in all, maybe it's simply that somebody erroneously removed the "NOT AVAILABLE YET" comment.
Yvan KOENIG (VALLAURIS, France) dimanche 24 novembre 2013 10:07:29
|
_______________________________________________
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