ftp - check if file on remote exists (skip overriding)
I have a script that uploads a file from local to remote place using ftp. The problem is that, if on remote host there is a file called the same as the one I want to upload, the ftp program overrides that file. But I don't want to override nothing (even if the remote file is older, smaller or whatever).
The problem is that I can't test if a file exist on remote (doing [ filename ]) because ftp only allows me limited commands (like ls, mkdir, cd, etc.)
So, how can I check if the file i want to upload already exists, so I can skip overriding ?
- Using sunique feature isn't a solution. I don't want to copy nothing if it's there already.
- Maybe using other ftp programs might help, but what programs ?