Re: move with System Events
Re: move with System Events
- Subject: Re: move with System Events
- From: Shane Stanley <email@hidden>
- Date: Sun, 24 Nov 2013 16:40:46 +1100
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:
|
_______________________________________________
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