Shell script to remote server help please

Im trying to delete a folder on 1 of our servers on our network. I want to be able to do this without mounting the volume. So I fiqured I could use “do shell script” Can somebody show me how I could login and then navigate to a desktop folder called “files” , return a directory of files, and then how I would delete one of these files.

BTW, the server that I would be hitting is a Mac running Server 10.4.8


Hi Pete,

you can do i with this code:

-- Remote Apple Events must be enabled on remote machine !!
property user_name : ""
property pass_word : ""
property file_name : ""

set RemoteServer to choose URL showing File servers -- get remote server
set RemoteBonjourName to characters 7 thru -2 of RemoteServer as string -- set remote server bonjour name
set RemoteMachine to "eppc://" & user_name & ":" & pass_word & "@" & RemoteBonjourName

tell application "Finder" of machine RemoteMachine
	using terms from application "Finder"
		delete (some file of folder "files" whose name is file_name)
	end using terms from
end tell

thanks, works great