개인 정보를 삭제하도록 수정 된 다음 스크립트가 있습니다.Fetch 및 applescript를 사용하여 모든 파일을 어떻게 다운로드합니까?
-- This line is for testing.
set the clipboard to "1234567890"
set loginName to "username"
-- Password is stored in KeyChain (you need to do manually).
-- Create Remote path
set folderNumber to the clipboard as string
set subdir1 to character 1 of folderNumber
set subdir2 to character 2 of folderNumber
set remotePath to "/files/" & subdir1 & "/" & subdir2 & "/" & folderNumber
-- Create Local path
set homeFolder to (path to home folder) as string
set localPath to homeFolder & "LOCALSTORAGE" as string
set localStorage to localPath & ":" & folderNumber & ":" as string
-- Create Local file
tell application "Finder"
try
make new folder at localPath with properties {name:folderNumber}
on error e number n
-- Do nothing.
end try
end tell
-- Connect to FTP
tell application "Fetch"
activate
set tWindow to make new transfer window at beginning with properties {hostname:"ftpServerAddress", username:loginName, initial folder:remotePath}
tell window tWindow
download every remote item to beginning of alias localStorage
close window
end tell
quit
end tell
-- Open folder
tell application "Finder"
open localStorage
end tell
스크립트를 실행할 때 다음 줄이 실패합니다.
error "Fetch got an error: Can’t get every remote item of window (transfer window id 232280960)." number -1728 from every remote item of window (transfer window id 232280960)
사람이 오류가 의미 또는 해결 방법을 무엇을 알고 있나요 다음과 같이
download every remote item to beginning of alias localStorage
내가 오류는? 나는 행운을 빌어 요없이 Fetch 웹 사이트를 시도했다. "가져 오기"btw는 FTP 클라이언트 가져 오기입니다.
감사합니다! 그거야. 또한 "미러 폴더"옵션에 대해 appleScript를 기록 할 수 있음을 발견했습니다. 그로부터 나는 모든 것을 끝내라는 명령을 받았다. –