SFTP - 'put' doing an 'mput'

Hi guys,

I'm having a problem with F-Secure Unix.

When I try a simple command;
sftp> put local.test remote.test

I expect that the local file local.test would be copied to the remote file remote.test
However sftp is attempting to copy local.test & remote.test from the local machine, as if I had run an mput command.

If I create a local file called remote.test - it successfully copies both files to the remote box.

Is this just a quirk of F-Secure ? If so is there any way to rename a file on the sftp command line ?
If possible I'd like to avoid wrapping this in a script to rename the file locally.

Thanks in advance.

On HP-UX (ssh3.1)
put [flags] local-path [local-path]
Upload local-path and store it on the remote machine. If the
remote path name is not specified, it is given the same name it
has on the local machine. If the -P flag is specified, then the
file's full permission and access time are copied too.

An example would be:
put /apathon/localserver/andthefilename.txt

Not that I'm aware of.

Try the following:
cp local.text local.txt.ftp
perform ftp login
perform ftp cd [remote-side-path]
perform ftp put
close
bye
rm local.txt.ftp

It's crude, but simple. You might gain more from entering man sftp from the command-line.

HTH's :wink:

Cheers Cameron,

I've put it into a wrapper script to temporarily rename the file locally for now. It's a bit of a ball-ache as we work with generic file forwarding processes and simply pass a whole load of variables into a config file.
E.g TYPE=SFTP SOURCE=/path/path/ PATTERN=*.txt DESTFILE=new.txt etc

...and the process fills in a template, performs the logging, generates alerts etc.

I've got it working but I've had to hardcode most of it and mess around with a custom template. But hey - it's working.

Ta.