Copying from one computer to another

Is it possible to copy a folder of files from my computer to another computer using Remote Apple Events?

Thanks
Pirri

Why not use scp??

This one is for single files…


tell application "Finder"
	set theFile to choose file
	tell application "Terminal"
		do script "scp \"" & (POSIX path of theFile) & "\" username@somehost.domain:/home/username/"
	end tell
end tell

And this one is for folders, although i’m not sure if it will cripple extensionless files(os9).


tell application "Finder"
	set theFolder to choose folder  -- Choose the folder to send, and set all the needed variables
	set theFolderName to the name of theFolder
	set theParent to (the parent of theFolder) as alias
-- Construct the shell script before passing it to the terminal. The script will make a .tar arichive of the selected folder and secureCopy it to the destination, delete the tar file on the local computer, unpack the file on the destination, and remove the sent tar file.
	set theScript to ("cd " & (POSIX path of theParent) & "
tar -cf ~/" & theFolderName & ".tar " & theFolderName & "/
scp ~/" & theFolderName & ".tar username@somehost.domain:/home/username/
cd ~/
rm " & theFolderName & ".tar
ssh username@somehost.domain \"tar -xf " & theFolderName & ".tar
rm " & theFolderName & ".tar\"
") as string
end tell
-- do the unixy magic...
tell application "Terminal"
	do script theScript
end tell

You will have to set up a no password login, because typing passwords will break the script.