in reply to existence of a file on remote host

Well, see the problem with the code you've posted is that it's nonexistent. Written code has a much better chance of not working (or even working) than that which hasn't been.

(Perhaps if you posted what you've tried . . .)

--
We're looking for people in ATL