At work we use a UNIX machine that I telnet into. I’m trying to figure out a way to copy the files from the UNIX print queue onto my Mac. I’ve used kermit in the past, but it’s too slow and I want something easily scriptable.
Is there a simple way to mount a UNIX machine as a drive? Or might rcp, curl, or wget do the job?
So far, the only way I can copy from the UNIX machine’s IP address is by using ftp and GUI scripting (see below)… but I’d like something simpler, that runs in the background without launching terminal. And if you’re wondering why I don’t use the Do Shell Script command, I can’t get the password to work, whether I use “ftp mylogin:mypassword@myipaddress” or “ftp myipaddress” user “mylogin” password “mypassword”.
display dialog "What file do you want to download?" default answer "" buttons {"Ok", "Cancel"} default button 1
copy the result as list to {filename, buttonpressed}
tell application "Terminal"
activate
do script "ftp mylogin@192.168.x.x"
end tell
delay 1
tell application "System Events"
keystroke "mypassword"
keystroke return
keystroke "cd /myprintqueue/%myloginprt"
keystroke return
keystroke "get " & filename
keystroke return
end tell
delay 2
tell application "System Events"
keystroke "exit"
keystroke return
keystroke "exit"
keystroke return
keystroke "w" using command down
end tell