Untitled
public text v1 · immutableon run argv
set theUser to item 1 of argv
set theHost to item 2 of argv
set thePath to item 3 of argv
set theFile to item 4 of argv
tell application "Cyberduck"
set theBrowser to (make new browser)
with timeout of 60 seconds
tell (theBrowser)
connect to theHost with protocol "sftp" as user theUser with initial folder thePath
if not (exists file theFile) then
touch file theFile
end if
edit file theFile
end tell
end timeout
print working folder of theBrowser
end tell
end run