Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using WinSCP to interact with a remote server that supports only SFTP and doesn't allow SSH access.

My interaction involves moving/deleting a subset of files (identified by file names) in a certain directory.

To simplify this, I would typically synchronize [ Remote -> Local ], delete the files locally using the cygwin commandline (so that I can specify a list of file names instead of selecting files in the GUI) and then synchronize [ Local -> Remote ] to push the deletes to remote.

But, now, I want to further simplify the process so I can hand this over to an operations person. I went looking and was delighted to find that WinScp suppords 'commands'.

It would be great if I could enter something like this in the 'Command' field at the bottom in the 'Commander' view of WinSCP:

get queue-queue-from-DLQ-ID-69703273-db51-11e1-ba9f-005056010165 \
    queue-queue-from-DLQ-ID-3d64697a-db51-11e1-b86e-005056010166 \
    queue-queue-from-DLQ-ID-76fdb365-db50-11e1-b78d-005056010164 \
    queue-queue-from-DLQ-ID-76ed3836-db50-11e1-ba9f-005056010165

But when I enter this in the 'Command' field, I get the following error:

Current SFTP-3 session does not support command you request. Separate shell session may be opened to process the command. Do you want to open separate shell session?

Error 1 : enter image description here

When I hit ok, I get the following error:

Error skipping startup message. Your shell is probably incompatible with the applicaiton (BASH is recommended).

Error 2 : enter image description here

The latter one is probably due to the fact that SSH is not supported.

But my question is, since 'get' is an SFTP command, why am I getting the first error? Doesn't WinSCP itself use that command under the covers to support a gui 'copy to local' operation?

How can I configure either WinSCP or the linux box so that I can do what I have shown above?

share|improve this question
    
I guess this answers my question: winscp.net/eng/docs/remote_command Apparently, the 'Command' feature is only supported for SCP. I wonder why WinSCP can't expose a commandline interface for SFTP operations that are generally supported during an sftp interactive session. – Vijay Ratnagiri Aug 6 '12 at 22:10
up vote 1 down vote accepted

I guess this answers my question: http://winscp.net/eng/docs/remote_command

Apparently, the 'Command' feature is only supported for SCP.

I wonder why WinSCP can't expose a commandline interface for SFTP operations that are generally supported during an sftp interactive session.

share|improve this answer
    
WinSCP has commandline interface: winscp.net/eng/docs/scripting You just cannot use the commands from the GUI. – Martin Prikryl Apr 11 '13 at 9:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .