• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSFileManager problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileManager problem


  • Subject: Re: NSFileManager problem
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 26 Oct 2015 19:37:08 +1100

On 26 Oct 2015, at 6:55 PM, Takaaki Naganoya <email@hidden> wrote:

I wrote an easy file manage AppleScript (AppleScript 1) to move files from shared folder by NSFileManager’s moveItemAtURL: toURL: error: method. Moving files from other user via network cased privilege related error.

So, I changed it to Finder version (AppleScript 2). 

Can we avoid such a error when we use NSFileManager ?

Can you tell us the exact error? Change this:

(defM's moveItemAtURL:fromPath toURL:toPath |error|:(missing value)) â€”Error!! (result was false not true)

To:

set {theResult, theError} to (defM's moveItemAtURL:fromPath toURL:toPath |error|:(reference)) 
if not theResult as boolean then
display dialog (theError's description() as text)
end if


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >NSFileManager problem (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: NSFileManager problem
  • Next by Date: Re: NSFileManager problem
  • Previous by thread: NSFileManager problem
  • Next by thread: Re: NSFileManager problem
  • Index(es):
    • Date
    • Thread