2013-11-20 5 views
1

우리는 어디에서 applescript가있는 폴더를 복사하고 싶은가의 삼바 공유를 가지고 있습니다.마운트 된 폴더를 로컬 폴더에 복사

the routine can not edit objects of this class." number -10010 

내가, 예를 들어, 시도 및 SO 이미 많은 솔루션을 결합 :

mount volume "smb://samba.com/e_18_data11$" 
delay 3 

set sourcefolder to ("smb://samba.com/e_18_data11$/e_18_data11$/folder1/folder2" as POSIX file) 
set localfolder to ("/Users/username/Dropbox/Test" as POSIX file) 

tell application "Finder" to duplicate sourcefolder to localfolder 

이이 오류가 계속 저를 준다 : 이것은 내가 이미 (설치 작품)이 무엇인가 this solution

- OS X 그것은 아마도 잘못입니다 sourcefolder 사양의 10.9

+1

가 ==> 당신의 애플 스크립트로 파인더에서 실제 sourcefolder를 드래그해야합니다. 경로를 스크립트에 붙여 넣어야합니다. sourcefolder에 해당 경로를 사용하십시오. 나는 그 트릭을해야한다고 생각해. –

답변

2

. "smb : //"대신 볼륨 이름을 사용할 수 있다고 생각합니다.

set sourcefolder to ("/Volumes/7samba.com/e_18_data11$/e_18_data11$/folder1/folder2" as POSIX file) 

(마운트 된 볼륨의 이름이 "7samba.com")


팁 : AppleScriptFinder의 실제 sourcefolder을 끕니다. 경로를 스크립트에 붙여 넣어야합니다. sourcefolder에 해당 경로를 사용하십시오.


더 :

당신이 점점 오류 :

Mac OS error -10010 (telBadHTypeErr): bad hook type specified 

내가 스크립트가 작동합니다 있는지 확인하기 위해 (두 개의 로컬 폴더로)을 테스트했다. 그것은 작동했고 폴더를 복제했습니다.

당신은 (또는 어쨌든한다)과 같이, try 블록에 중요한 코드를 래핑 할 수 있습니다

try 

     duplicate sourcefolder to localfolder 

    on error the error_message number the error_number 
     display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1 
    end try 

당신이 확인하고 오류에 대응하는 수이 방법을.

는 추가 :

는이 같은 존재를 확인할 수 있습니다 될 수있다

tell application "Finder" 
    set aBoolean1 to get (exists sourcefolder) 
    set aBoolean2 to get (exists localfolder) 
end tell 

log aBoolean1 
log aBoolean2 

모두 부울의는 YES

+0

또한 Finder의 스크립팅 사전에서 "duplicate"명령을 찾으십시오. –

+0

감사합니다. 난 여전히 오류가 발생합니다 'Finder에 오류가 발생했습니다 : 처리기가이 클래스의 객체를 처리 할 수 ​​없습니다. (-10010)' – toefftoefftoeff

+0

Finder는 폴더를 파일로보고 있으므로 잘못된 개체라고 생각합니까? – toefftoefftoeff

관련 문제