Delete File on Server at same time as local file

What’s wrong with my syntax here? I can delete the local file but not the server file.


set killspot to (choose file with prompt "Choose which spots to delete" with multiple selections allowed)

display dialog ("ARE YOU SURE YOU WANT TO DELETE THESE SPOTS?" & return & killspot as string)

try
	mount volume "smb://user:pass@server/share/folder/"
end try

repeat with local_kill in killspot
	
	set server_kill to ("smb://server/share/folder/" & (get name of (info for local_kill)))
	
	--display dialog server_kill
	
	tell application "Finder"
		
		move file local_kill to trash
		
		move file server_kill to trash
		
	end tell

Hi,

AppleScript works only with HFS paths (colon delimited) unlike UNIX which works with POSIX paths (slash delimited).
BTW: I’d prefer to use the shell to delete the file on an non local volume


.
tell application "Finder" to move local_kill to trash
do shell script "rm " & quoted form of server_kill
.

I’m sorry StefanK, how exactly do I reference the server file?

the file is specified with this line

set server_kill to "smb://server/share/folder/" & (get name of (info for local_kill)))

Edit: But the path should start with “Volumes/server/.”

Thanks, you’re the best! It worked.